Public Attributes | List of all members
BPrivate::Network::BHttpBody Struct Reference

Represents a HTTP response body. More...

Public Attributes

std::optional< BStringtext
 A string containing the body of the HTTP request. More...
 

Detailed Description

Represents a HTTP response body.

The HTTP response body is captured in this object. The body is either stored into a target, or into a text variable, depending on how you called the BHttpSession::Execute() method.

You will usually get a reference to this object through the BHttpResult::Body() method. If you want to keep the contents of the body beyond the lifetime of the BHttpResult object, you should move the data into owned objects of your own.

Since
Haiku R1

Member Data Documentation

◆ text

std::optional< BString > BPrivate::Network::BHttpBody::text

A string containing the body of the HTTP request.

The value of this class variable is set to std::nullopt if the target body was written to a specified target. Otherwise, the response body is stored in this string. If the response body was empty, then this will be an empty string.

Since
Haiku R1