Contents

CFHTTPMessageCreateCopy(_:_:)

Gets a copy of a CFHTTPMessage object.

Declaration

func CFHTTPMessageCreateCopy(_ alloc: CFAllocator?, _ message: CFHTTPMessage) -> Unmanaged<CFHTTPMessage>

Parameters

  • message:

    The message to copy.

Return Value

A CFHTTPMessage object, or NULL if there was a problem creating the object. Ownership follows the The Create Rule.

Discussion

This function returns a copy of a CFHTTPMessage object that you can modify, for example, by calling CFHTTPMessageCopyHeaderFieldValue(_:_:) or by calling CFHTTPMessageSetBody(_:_:). Then you can serialize the message by calling CFHTTPMessageCopySerializedMessage(_:) and send the serialized message to a client or a server.

See Also

HTTP Messages