aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
Loading...
Searching...
No Matches
Public Attributes | List of all members
Aws::Crt::Http::HttpRequestOptions Struct Reference

#include <HttpConnection.h>

Public Attributes

HttpRequestrequest
 
OnIncomingHeaders onIncomingHeaders
 
OnIncomingHeadersBlockDone onIncomingHeadersBlockDone
 
OnIncomingBody onIncomingBody
 
OnStreamComplete onStreamComplete
 
bool UseManualDataWrites = false
 

Detailed Description

POD structure used for setting up an Http Request

Member Data Documentation

◆ onIncomingBody

OnIncomingBody Aws::Crt::Http::HttpRequestOptions::onIncomingBody

See OnIncomingBody for more info. This value can be empty if you will not be receiving a body.

◆ onIncomingHeaders

OnIncomingHeaders Aws::Crt::Http::HttpRequestOptions::onIncomingHeaders

See OnIncomingHeaders for more info. This value must be set.

◆ onIncomingHeadersBlockDone

OnIncomingHeadersBlockDone Aws::Crt::Http::HttpRequestOptions::onIncomingHeadersBlockDone

◆ onStreamComplete

OnStreamComplete Aws::Crt::Http::HttpRequestOptions::onStreamComplete

See OnStreamComplete for more info. This value can be empty.

◆ request

HttpRequest* Aws::Crt::Http::HttpRequestOptions::request

The actual http request

◆ UseManualDataWrites

bool Aws::Crt::Http::HttpRequestOptions::UseManualDataWrites = false

When true, request body data will be provided over time via HttpClientStream::WriteData() The stream will only be polled for writing when data has been supplied. When false (default), the entire request body is read from the input stream immediately.

HTTP/1.1 requirements:

  • SHOULD have either Content-Length OR Transfer-Encoding: chunked header (but not both). Fails with AWS_ERROR_HTTP_INVALID_HEADER_FIELD if both are set. Transfer-Encoding: chunked header will be automatically added if neither header is set.
  • MUST NOT have a body stream set. Fails with AWS_ERROR_HTTP_INVALID_HEADER_FIELD otherwise.
  • With Content-Length: total bytes written must exactly match the declared length. Fails with AWS_ERROR_HTTP_OUTGOING_STREAM_LENGTH_INCORRECT if data exceeds Content-Length, or if end_stream is set before enough data is written.
  • With Transfer-Encoding: chunked: no length validation, data sent as chunks.

HTTP/2: No Content-Length or Transfer-Encoding header required. Data sent via DATA frames. Note: When this variable is set, we expect request to be ended with a data write with end_stream=true.


The documentation for this struct was generated from the following file: