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 @EnableWebFluxSecurity @EnableReactiveMethodSecurity public …

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. HttpClient httpclient = getHttpClient(); …

How to send post request in java with a JSON body

I am confused as to how to send a post request in Java with JSON parameters. I have seen many examples that use HttpPost library which I can not access. Below is my code: public class endpointtest { …

Mapping nested JSON values in a Java class

I can’t figure out how to handle nested JSON values in my Java classes. To make it simple as possible, I created four Java classes with every ‘nested level’. However, I’m trying to have all these …

Upload a file using Java 11 HttpClient to SpringBoot Server

My client upload method: public static void addPhoto(File photo) throws ParseException, IOException, InterruptedException { HttpClient client = HttpClient.newBuilder().build(); HttpRequest …

Which HTTP status code is correct for Subscription cancel exception?

Which HTTP status code is correct for Subscription Canceled exception? I need to throw an exception when the user tries to accesses a certain page. I checked a few statuses like Payment Required, but …

Java http call returning response code: 501

I am having an issue with this error: **Server returned HTTP response code: 501 for URL: http://dev1:8080/data/xml/01423_01.xml** See this code: private static Map sendRequest(String …

How can I find the response time of a HTTP request through a Socket

I’m using a Java socket, connected to a server. If I send a HEADER http request, how can I measure the response time from the server? Must I use a provided java timer, or is there an easier way? I’m …