init(endpoint: URL) Initializes a HTTPRequest object.
init(endpoint: URL, withBody : [String : Any], bodyEncoding : RequestBodyEncoding ) Initializes a HTTPRequest object, with a body.
Framework
struct HTTPRequestHTTPRequest is very similar to URLSession’s URLRequest. HTTPRequest represents an HTTP request.
init(endpoint: URL) init(endpoint: URL, withBody : [String : Any], bodyEncoding : RequestBodyEncoding )
httpRequestInstance.endpointQueryItems = ["key": "value"]var httpMethod : HTTPMethod var additionalHTTPHeaders : [String : String]? var httpBody : [String : Any]? var bodyEncoding : RequestBodyEncoding RequestBodyEncoding of the body being sent. Defaults to RequestBodyEncoding.FORM .var endpointQueryItems : [String : String]? var timeoutAfter : TimeAmount ? let endpoint: URL func authenticatedRequest (for: HTTPRequest, numberOfRetries : UInt8) async throws -> HTTPRequest.Response HTTPRequest.Response .struct Response authenticatedRequest(for:numberOfRetries:) .