Skip to content
Advertisement

Tag: webclient

@DeleteMapping endpoint not triggered at all

My webClient calls work fine with @GetMapping, but @DeleteMapping isn’t even triggered. Here are the two methods I’m using: The endpoints are: When I try to delete an item I get no errors, no 405, no 400, no 403, nothing. The webClient call returns normally (with a MonoIgnorePublisher object), but the endpoint seems to not be triggered at all (I

Unable to receive data out of api call with webclient

So I’m trying to get my head around the webclient, but I keep getting a nullpointerexception, though my test work fine and say that object is not null. I also see my console making connection to the api. But when I ask the value, I get null. Here are the two objects I use for it: and then here I

How to handle UnsupportedMediaTypeException in Spring Boot?

Hello I’m trying to call API by using Webclient in spring boot. But I’m having some issue. Although the response I requested is a json response, the server gives me an xml response when server error occur. So I am getting UnsupportedMediaTypeException error when server error occur. Therefore I would like to make a buisness logic that can send me

WebClient – adding defaultHeaders

I’m trying to put multiple headers into defaultHeaders(), But I don’t have idea how to create Consumer object from return of createHeaders() method I can build my header in that way: but how to wrap it into Consumer? Answer Clearly the method doc says that it needs a Consumer of some Type. So you can create an anonymous class implementing

Advertisement