How to get the Request or the request body from org.springframework.web.reactive.function.client.WebClient The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceHow to intercept a request when using SpringBoot WebClientHow do I efficiently iterate over each entry in a Java Map?Does a finally block always get executed in Java?Create ArrayList from arrayHow do I call one constructor from another in Java?How do I read / convert an InputStream into a String in Java?How do I generate random integers within a specific range in Java?How to get an enum value from a string value in Java?How to use java.net.URLConnection to fire and handle HTTP requestsHow do I convert a String to an int in Java?How do I fix android.os.NetworkOnMainThreadException?
Didn't get enough time to take a Coding Test - what to do now?
Why can't devices on different VLANs, but on the same subnet, communicate?
Why can't wing-mounted spoilers be used to steepen approaches?
Are my PIs rude or am I just being too sensitive?
Difference between "generating set" and free product?
Relations between two reciprocal partial derivatives?
Why not take a picture of a closer black hole?
Is above average number of years spent on PhD considered a red flag in future academia or industry positions?
Does Parliament hold absolute power in the UK?
Create an outline of font
Make it rain characters
Would it be possible to rearrange a dragon's flight muscle to somewhat circumvent the square-cube law?
The variadic template constructor of my class cannot modify my class members, why is that so?
Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?
Road tyres vs "Street" tyres for charity ride on MTB Tandem
Scientific Reports - Significant Figures
Grover's algorithm - DES circuit as oracle?
Semisimplicity of the category of coherent sheaves?
What information about me do stores get via my credit card?
How do I add random spotting to the same face in cycles?
How did the audience guess the pentatonic scale in Bobby McFerrin's presentation?
Did God make two great lights or did He make the great light two?
Hopping to infinity along a string of digits
What aspect of planet Earth must be changed to prevent the industrial revolution?
How to get the Request or the request body from org.springframework.web.reactive.function.client.WebClient
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceHow to intercept a request when using SpringBoot WebClientHow do I efficiently iterate over each entry in a Java Map?Does a finally block always get executed in Java?Create ArrayList from arrayHow do I call one constructor from another in Java?How do I read / convert an InputStream into a String in Java?How do I generate random integers within a specific range in Java?How to get an enum value from a string value in Java?How to use java.net.URLConnection to fire and handle HTTP requestsHow do I convert a String to an int in Java?How do I fix android.os.NetworkOnMainThreadException?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have a piece of code
@Autowired
private WebClient webClient;
webClient.post()
.header(AUTHORIZATION, BEARER + token)
.body(BodyInserters.fromObject(payment))
.retrieve().bodyToMono(Payment.class)
.onErrorResume(exception -> Mono.error(new ApiException(exception)))
Is there any way to get the request or the request body as a string from this piece of code ?
java spring rx-java spring-webflux
add a comment |
I have a piece of code
@Autowired
private WebClient webClient;
webClient.post()
.header(AUTHORIZATION, BEARER + token)
.body(BodyInserters.fromObject(payment))
.retrieve().bodyToMono(Payment.class)
.onErrorResume(exception -> Mono.error(new ApiException(exception)))
Is there any way to get the request or the request body as a string from this piece of code ?
java spring rx-java spring-webflux
Possible duplicate of How to intercept a request when using SpringBoot WebClient
– Strelok
Mar 8 at 13:57
@Strelok,Thanks for your effort, but is not what i am asking for. Please read this comment stackoverflow.com/questions/51726943/…
– Melad Ezzat
Mar 8 at 14:25
What are you trying to achieve? If it's for logging purposes, the answer is different than if you want to actually do something else with the body.
– Frischling
Mar 11 at 12:02
add a comment |
I have a piece of code
@Autowired
private WebClient webClient;
webClient.post()
.header(AUTHORIZATION, BEARER + token)
.body(BodyInserters.fromObject(payment))
.retrieve().bodyToMono(Payment.class)
.onErrorResume(exception -> Mono.error(new ApiException(exception)))
Is there any way to get the request or the request body as a string from this piece of code ?
java spring rx-java spring-webflux
I have a piece of code
@Autowired
private WebClient webClient;
webClient.post()
.header(AUTHORIZATION, BEARER + token)
.body(BodyInserters.fromObject(payment))
.retrieve().bodyToMono(Payment.class)
.onErrorResume(exception -> Mono.error(new ApiException(exception)))
Is there any way to get the request or the request body as a string from this piece of code ?
java spring rx-java spring-webflux
java spring rx-java spring-webflux
asked Mar 8 at 13:20
Melad EzzatMelad Ezzat
8662927
8662927
Possible duplicate of How to intercept a request when using SpringBoot WebClient
– Strelok
Mar 8 at 13:57
@Strelok,Thanks for your effort, but is not what i am asking for. Please read this comment stackoverflow.com/questions/51726943/…
– Melad Ezzat
Mar 8 at 14:25
What are you trying to achieve? If it's for logging purposes, the answer is different than if you want to actually do something else with the body.
– Frischling
Mar 11 at 12:02
add a comment |
Possible duplicate of How to intercept a request when using SpringBoot WebClient
– Strelok
Mar 8 at 13:57
@Strelok,Thanks for your effort, but is not what i am asking for. Please read this comment stackoverflow.com/questions/51726943/…
– Melad Ezzat
Mar 8 at 14:25
What are you trying to achieve? If it's for logging purposes, the answer is different than if you want to actually do something else with the body.
– Frischling
Mar 11 at 12:02
Possible duplicate of How to intercept a request when using SpringBoot WebClient
– Strelok
Mar 8 at 13:57
Possible duplicate of How to intercept a request when using SpringBoot WebClient
– Strelok
Mar 8 at 13:57
@Strelok,Thanks for your effort, but is not what i am asking for. Please read this comment stackoverflow.com/questions/51726943/…
– Melad Ezzat
Mar 8 at 14:25
@Strelok,Thanks for your effort, but is not what i am asking for. Please read this comment stackoverflow.com/questions/51726943/…
– Melad Ezzat
Mar 8 at 14:25
What are you trying to achieve? If it's for logging purposes, the answer is different than if you want to actually do something else with the body.
– Frischling
Mar 11 at 12:02
What are you trying to achieve? If it's for logging purposes, the answer is different than if you want to actually do something else with the body.
– Frischling
Mar 11 at 12:02
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55064100%2fhow-to-get-the-request-or-the-request-body-from-org-springframework-web-reactive%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55064100%2fhow-to-get-the-request-or-the-request-body-from-org-springframework-web-reactive%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Possible duplicate of How to intercept a request when using SpringBoot WebClient
– Strelok
Mar 8 at 13:57
@Strelok,Thanks for your effort, but is not what i am asking for. Please read this comment stackoverflow.com/questions/51726943/…
– Melad Ezzat
Mar 8 at 14:25
What are you trying to achieve? If it's for logging purposes, the answer is different than if you want to actually do something else with the body.
– Frischling
Mar 11 at 12:02