Hello i want to make a http server with nanohttpd that shows installed apps, and convert them to apk and download. I can list but how can i download the app i select Answer Ok, I basicly take the url after list the apps and check which appname equal to url after that i start to download it like that
Tag: http
Spring POST Method Microservice 500 exception
So, im trying to write a microservice with basic GET POST PUT DELETE commands. Its a Spring Maven Java programm with a mysql server When I try to post something it works, however if I dont include the Id it returns an exception: This is weird, because in the mysql console I can Insert a customer without the id, it
HTTP POST with request body
For this request, I am trying to set the entity, however when I do request.setEntity, it says required type HttpEntity, on upcasting it to HttpEntity as request.setEntity((HttpEntity) entity) it still gives me exception. Answer I was using “com.signalfx.shaded.apache.http.entity.StringEntity” instead of “import org.apache.http.entity.StringEntity” which was causing the issue.
Use API REST interface to authenticate user on android app
I am writing an App with friends that uses an API to login. I am using OKHTTP for the GET/POST Requests. I have written the following code for the Login page: After trying to login I get following error message I have tried multithreading but I have not found a solution that awaits the result of the login. And regarding
400 Bad Request when using Spring Boot
I am sending a Http POST request to my RESTful API build with Spring Boot and get the “400 Bad Request” response. My POST request is made with Postman, send to with the body I want to pass the filename variable to my Java Method. My RESTful api is build in Java with Spring Boot I tried with and with
How to save the request body after reading it in the ServerAuthenticationConverter?
Guys! maybe someone faced the problem of getting the request body.. I am trying to friend Spring WebFlux + Security: I use SecurityConfig where I set for check authentication I have a custom Converter (AuthDataConverter) and a custom Manager (AuthManager). When I do POST http Request I am falling in Converter: inside of the Converter – I get Headers and
How to send a PUT request with multipart/form-data body with Java Http Client?
I am using the HttpClient and HttpRequest available on java.net.http. I have successfully sent some GET and POST requests, but I have no clue about how to send a PUT/POST request with multipart/form-data body: The curl equivalent of this request would be something like: Should I use some kind of BodyPublishers in the POST() or PUT() method in order to
I can’t understand casting interface to children that don’t have any parents
I am studying lambda and then WebClient Class so I am creating bean of WebClient I think top codes and bottom codes are the same I don’t understand this cast situation because HttpMessageWriter is interface and LoggingCodecSupport is class but LoggingCodecSupport doesn’t implement HttpMessageWriter, so I think HttpMessageWriter can’t cast to LoggingCodecSupport This is the code of HttpMessageWriter This is
java.net.URISyntaxException: Illegal character in query at index 177
I tried to get Azure Usage details via nextLink which is shared by Azure. while i tried to make http request URISyntaxException is occured. This is the nextLink url: “https://management.azure.com/subscriptions/78c50b17-61fd-40cc-819c-4953586c7850/providers/Microsoft.Consumption/usageDetails?api-version=2019-11-01&$filter=properties/usageStart eq ‘2020-07-1’ and properties/usageEnd eq ‘2020-07-30’ &metric=actualcost&$expand=properties/meterDetails,properties/additionalInfo&sessiontoken=15:785628&$skiptoken=827CDTHDWI07C46616C7365730&skiptokenver=v1&id=2d790-d675-45d-89j56-3989w06cca” I think this is because of characters such as ?, & and ! in my URL. so I tried using: URLEncoder.encode(myUrl, “UTF-8”); but
The speed does not change from an asynchronous request
I need to make about 60 HTTP requests. In the first case, I did not use an asynchronous request and the speed was about 1.5 minutes. In the second case, I used an asynchronous request and the speed did not change either and was about 1.5 minutes. Please see my code. Maybe I’m not doing the asynchronous request correctly or