Adopt HTTPRequest
and HTTPResponse
type from swift-http-types
#567
Labels
enhancement
New feature or request
Milestone
Request for Change
The
swift-http-types
package was added by @zunda-pixel in the #564 which refactored the internalHTTPHeaders
type to use theHTTPFields
from the package.The
swift-http-types
also provides bothHTTPRequest
andHTTPResponse
generic types.Current behavior
We currently have both
HTTPRequest
andHTTPResponse
types that we use internally for all requests/responses.New behavior
Refactor internal HTTP layer to use types from
swift-http-types
package.Open questions
swift-http-types
doesn't standardize the body property, that is up to us to define how we're handling it.I suggest the refactor of the
HTTPClientType
to be:And forward to
upload(from:body:)
in case a non-nil body is provided, ordata(for:)
, as:The text was updated successfully, but these errors were encountered: