Creates and returns a
CFHTTPMessage object for an HTTP request.
- iOS 2.0+
- macOS 10.1+
- Mac Catalyst 13.0+
- tvOS 9.0+
The allocator to use to allocate memory for the new object. Pass
NULLor kCFAllocatorDefault to use the current default allocator.
The request method for the request. Use any of the request methods allowed by the HTTP version specified by
The URL to which the request will be sent.
The HTTP version for this message. Pass
CFHTTPMessage object, or
NULL if there was a problem creating the object. Ownership follows the The Create Rule.
This function returns a
CFHTTPMessage object that you can use to build an HTTP request. Continue building the request by calling
CFHTTPMessage to set the message’s body. Call
CFHTTPMessage to set the message’s headers.
If you are using a
CFRead object to send the message, call
CFRead to create a read stream for the request. If you are not using
CFHTTPMessage to make the message ready for transmission by serializing it.