New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transfer previously set header/contentType to Message #358

Closed
svettwer opened this Issue Apr 9, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@svettwer
Member

svettwer commented Apr 9, 2018

Hi!

If you use a message instead of a payload, you have to set the contentType and the header information after setting the message itself.

http()
  .client(myClient)
  .send()
  .post()
  .message(new DefaultMessage("myMessage"))
  .contentType("application/json")
  .header("myHeader", "myHeaderValue");

Because the DSL allows to set the contentType and header information before setting the message, the information should be transferred to the message when set.

http()
  .client(myClient)
  .send()
  .post()
  .contentType("application/json")
  .header("myHeader", "myHeaderValue")
  .message(new DefaultMessage("myMessage"));

@svettwer svettwer modified the milestones: SOMEDAY, v2.7.5 Apr 9, 2018

@christophd christophd removed the READY label Apr 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment