Puttable

public protocol Puttable: Restable

Designates the conforming type as a PUT HTTP Request.

  • request() Extension method

    Creates a POST request for the current instance

    Throws

    An HTTPMethodError when the attempt to make the URLRequest failed.

    Declaration

    Swift

    public func request() throws -> URLRequest

    Return Value

    The URLRequest

  • request() Extension method

    Creates a PUT request for the current PreEncoded instance, and uses the data value as the body for the request.

    Throws

    An HTTPMethodError when the attempt to make the URLRequest failed.

    Declaration

    Swift

    public func request() throws -> URLRequest

    Return Value

    The URLRequest

  • request() Extension method

    Creates a POST request for the current Encodable instance, and encodes itself into the HTTP body of the request.

    Throws

    An HTTPMethodError when the attempt to make the URLRequest failed.

    Declaration

    Swift

    public func request() throws -> URLRequest

    Return Value

    The URLRequest