Skip to content

Instantly share code, notes, and snippets.

View artem-sherbachuk's full-sized avatar
🏠
Working from home

Artem Sherbachuk artem-sherbachuk

🏠
Working from home
View GitHub Profile
// MARK: - Adding a header to a single request
let headers: HTTPHeaders = [
"X-Mashape-Key": MY_API_KEY,
"Accept": "application/json"
]
Alamofire.request("https://mashape-community-urban-dictionary.p.mashape.com/define?term=smh", headers: headers)
.responseJSON { response in
debugPrint(response)