Netswift v1.0.0 - Request Body
This version introduces breaking changes.
Body
NetswiftRequest now introduces a Body
associated type which can then be used for encoding. This removes the need for implementing func body(encodedBy encoder: Encoder) -> Data?
and instead replaces it with a var body: Body?
requirement (which is nil
by default).
When Body conforms to Codable
, default implementations have been implemented with JSONEncoder
URLQueryItems
NetswiftRoute now replaces the var query: String?
requirement with var queryItems: [URLQueryItems]?
instead. This should hopefully reduce friction as most real life implementations deferred to URLQueryItem anyways.
What's Changed
- 💥 Add Body & use URLQueryItems instead of String? query by @MrSkwiggs in #45
Full Changelog: 0.9.0...1.0.0