Skip to content
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

http/client: add request interface that takes an iobuf #16705

Merged
merged 4 commits into from
Feb 26, 2024

Conversation

dotnwat
Copy link
Member

@dotnwat dotnwat commented Feb 26, 2024

  • Adds request() method that takes an iobuf
  • Updates users of make_request() to use the new interface
  • Sets HTTP/1.1 version explicitly

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x
  • v23.1.x

Release Notes

  • none

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
The users of make_request are replaced by the version of request that
takes an iobuf body.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
This is the default in Beast, but let's be explicit about it.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
req_stream->send_some(std::move(body)).get();
req_stream->send_eof().get();
resp_stream
= client->request(std::move(header), std::move(body)).get0();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: get0 is deprecated

@dotnwat dotnwat merged commit 799c7bb into redpanda-data:dev Feb 26, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants