By Tom Johnson / @tomjohnson
idratherbewriting.com
Slides available at
idratherbewriting.com/slides/using_api_like_developer/
curl --request GET "https://api.openweathermap.org/data/2.5/weather?zip=95050&units=imperial&appid=APIKEY"
Command | Description |
---|---|
--location |
Submits request to redirect |
-X, --request |
The HTTP method to use |
-i, --include |
Include response headers |
-d, --data |
Include data to post |
-H, --header |
Submit header |
@filename |
Load content from a file |
JSON objects:
{
"key1":"value1",
"key2":"value2"
}
JSON arrays:
["first", "second", "third"]
Temperature:
response.main.temp
Wind speed:
response.wind.speed
Wind direction:
response.wind.deg