All your API requests should go through WKRequest
. Here's the parameter list.
String
- The URL or path to call.
Enum
- The HTTP method for this specific endpoint. Available values are:
- .get
- .post
- .put
- .delete
[String: String]
- A set of query parameters to append to your URL
[String: String]
- Dictionary to be sent as the request body. WireKit provides an asDictionary
extension method to convert any Codable object into a valid dictionary.
[String: String]
- Dictionary of headers to be sent. By default Wirekit automatically adds Content-Type
and Accept
headers so you don't have to manually addd them here.
JSONDecoder
- Custom instance of JSONDecoder to be used then decoding this particular request. This is useful to implement custom decoding strategies