Last active
January 31, 2019 14:11
-
-
Save PaulusTM/61ad8c2d7506a0c1e2e077e546ed5481 to your computer and use it in GitHub Desktop.
This file is an example on how the use the Visual Studio Code REST Client plugin
This file contains hidden or 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
### Search for the details of Luke Skywalker | |
# @name search | |
GET https://swapi.co/api/people/?search=luke HTTP/1.1 | |
content-type: application/json | |
### Find the homeworld based on returned search details | |
# @name planet | |
GET {{search.response.body.$.results[0].homeworld}} HTTP/1.1 | |
Content-Type: application/json | |
### Get the species information from the search details | |
# @name species | |
GET {{search.response.body.$.results[0].species[0]}} HTTP/1.1 | |
Content-Type: application/json | |
### Get the first vehicle from the search details | |
# @name vehicle | |
GET {{search.response.body.$.results[0].vehicles[0]}} HTTP/1.1 | |
Content-Type: application/json | |
### Get the first starship from the search details | |
# @name ship | |
GET {{search.response.body.$.results[0].starships[0]}} HTTP/1.1 | |
Content-Type: application/json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment