We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// debugDescription : "Top-level String encoded as string JSON fragment."
mutating func encoded(encodable: Encodable, encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest { do { let encodable = AnyEncodable(encodable)
// encodable is primary data type(int / double/ string) httpBody = try encoder.encode(encodable) let contentTypeHeaderName = "Content-Type" if value(forHTTPHeaderField: contentTypeHeaderName) == nil { setValue("application/json", forHTTPHeaderField: contentTypeHeaderName) } return self } catch { throw MoyaError.encodableMapping(error) } }
The text was updated successfully, but these errors were encountered:
iPhone 5s iOS12.5.7
Sorry, something went wrong.
No branches or pull requests
// debugDescription : "Top-level String encoded as string JSON fragment."
mutating func encoded(encodable: Encodable, encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest {
do {
let encodable = AnyEncodable(encodable)
The text was updated successfully, but these errors were encountered: