HTTPMessage
- function
- new in 1.53
- convert a property list to an HTTP message
- The HTTP message to be sent should be in the form of a property list that may include these properties:
HTTP Request Message:
Method: GET or POST (if omitted, GET will be assumed if no Body is supplied, and POST if a Body is supplied).
Request: path to the resource being requested on the server (required).
Version: if not supplied, HTTP/1.1 will be assumed.
Header: if given, must be a property list of header keys and values.
Body: the body of the message. The body may be text, or it may be a property list, in which case it will automatically be encoded in key/value pairs.
HTTP Response Message:
Version: if not supplied, HTTP/1.1 will be assumed.
Status: a numeric status value to send. If not specified, defaults to 200 (meaning OK).
Reason: text of the reason for the returned status; defaults to OK.
Body: the content being sent. For a web server, this would typically be the HTML code of a page. The body may be a property list, in which case it will automatically be encoded in key/value pairs.