CFHTTPMessageCreateEmpty(_:_:)
Creates and returns a new, empty CFHTTPMessage object.
Declaration
func CFHTTPMessageCreateEmpty(_ alloc: CFAllocator?, _ isRequest: Bool) -> Unmanaged<CFHTTPMessage>Parameters
- isRequest:
A flag that determines whether to create an empty message request or an empty message response. Pass
TRUEto create an empty request message; passFALSEto create an empty response message.
Return Value
A new CFHTTPMessage object or NULL if there was a problem creating the object. Ownership follows the The Create Rule.
Discussion
Call CFHTTPMessageAppendBytes(_:_:_:) to store an incoming, serialized HTTP request or response message in the empty message object.
See Also
HTTP Messages
CFHTTPMessageCFHTTPMessageAddAuthentication(_:_:_:_:_:_:)CFHTTPMessageAppendBytes(_:_:_:)CFHTTPMessageApplyCredentialDictionary(_:_:_:_:)CFHTTPMessageApplyCredentials(_:_:_:_:_:)CFHTTPMessageCopyAllHeaderFields(_:)CFHTTPMessageCopyBody(_:)CFHTTPMessageCopyHeaderFieldValue(_:_:)CFHTTPMessageCopyRequestMethod(_:)CFHTTPMessageCopyRequestURL(_:)CFHTTPMessageCopyResponseStatusLine(_:)CFHTTPMessageCopySerializedMessage(_:)CFHTTPMessageCopyVersion(_:)CFHTTPMessageCreateCopy(_:_:)CFHTTPMessageCreateRequest(_:_:_:_:)