RequestBody

public enum RequestBody

The data sent as the message body of a request, such as for an HTTP POST request.

See

See Also: GetContentsOfURL

Convenience Constructors

  • This convenience constructor converts the ordered KeyValuePairs collection into an Array of tuples.

    Declaration

    Swift

    public static func json(_ payload: KeyValuePairs<Text, DictionaryValue>) -> RequestBody

    Parameters

    payload

    The payload of the request body, expressed as a dictionary literal.

    Return Value

    A JSON request body.

  • This convenience constructor converts the ordered KeyValuePairs collection into an Array of tuples.

    Declaration

    Swift

    public static func form(_ payload: KeyValuePairs<Text, MultipartFormValue>) -> RequestBody

    Parameters

    payload

    The payload of the request body, expressed as a dictionary literal.

    Return Value

    A multipart form request body.