Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Something: Codable {
- var thing: String? = nil
- }
- var request = URLRequest(URL(string: path)!)
- request.httpMethod = "PUT"
- headers.dictionary.forEach {
- request.addValue(_ value: $0.value, forHTTPHeaderField: $0.key)
- }
- request.httpBody = try? JSONEncoder().encode([something])
- AF.request(request).responseJSON { ...}
Add Comment
Please, Sign In to add comment