Created
March 4, 2019 06:10
-
-
Save TechWatching/68028e467156017b4c74dbd32791a4b2 to your computer and use it in GitHub Desktop.
HTTP requests for the Star Wars API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### List of start wars planets | |
GET https://swapi.co/api/planets/ HTTP/1.1 | |
### Get Luke Skywalker | |
# @name lukeRequest | |
GET https://swapi.co/api/people/?search=Luke HTTP/1.1 | |
### Get Luke Skywalker home planet | |
GET {{lukeRequest.response.body.results[0].homeworld}} HTTP/1.1 | |
### List available resources | |
GET https://swapi.co/api/ HTTP/1.1 | |
### Search planet with a specific name | |
@planetName = Naboo | |
GET https://swapi.co/api/planets/?search={{planetName}} HTTP/1.1 | |
### Search planet with a specific name in wookie encoding | |
GET https://swapi.co/api/planets/?search={{planetName}}&format=wookiee HTTP/1.1 | |
### List starships | |
GET https://swapi.co/api/starships HTTP/1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment