ark::comms::HttpHelperResponse

Defined in header “ark/comms/http_helpers.hh”.


A response from the HTTP helpers, from the helpers that return a full response rather than just the body.

Methods

  • bool successful()
    Returns true if the response should be considered successful or not (ie, completed normally, and had a status code between 200 and 299).

  • std::string error_message()
    Returns a more detailed error string. If successful is true, this will return an empty string.

Variables

  • bool completed= false
    If the request completed or experienced a network error.

  • std::string error_details
    If there was an associated error message (for example, if completed is false, then this should be populated with more details).

  • uint32_t status_code= 0
    The HTTP response status code.

  • core::Url request_url
    The original URL that was requested.

  • int64_t content_size= -1
    Content size. Will be -1 if there is no size reported. Will be the size of the content on the remote server, not necessarily the amount of content in the body.

  • HttpRequestType request_type
    The verb that was used.

  • core::ByteBuffer body
    Contents of the body.