Instance Property


The request body as an input stream.


var httpBodyStream: InputStream? { get set }


The request body of the receiver will be this input stream. The entire contents of the stream will be sent as the body, as in an HTTP POST request. The input stream should be unopened and the receiver will take over as the stream’s delegate.

Setting a body stream clears any data in httpBody. These values are mutually exclusive.

See Also

Setting HTTP Specific Properties

func addValue(String, forHTTPHeaderField: String)

Adds an HTTP header to the receiver’s HTTP header dictionary.

var allHTTPHeaderFields: [String : String]?

The receiver's header fields.

var httpBody: Data?

The request body of the receiver.

var httpMethod: String

The receiver’s HTTP request method.

var httpShouldHandleCookies: Bool

A boolean value that indicates whether the receiver should use the default cookie handling for the request.

var httpShouldUsePipelining: Bool

A boolean value that indicates whether the request can continue transmitting data before receiving a response from an earlier transmission.

func setValue(String?, forHTTPHeaderField: String)

Sets the specified HTTP header field.