Skip to content

Instantly share code, notes, and snippets.

@fazt
Created October 2, 2020 22:52
Show Gist options
  • Save fazt/3b0b181f5b779a3a3ab8bf28a110a9c3 to your computer and use it in GitHub Desktop.
Save fazt/3b0b181f5b779a3a3ab8bf28a110a9c3 to your computer and use it in GitHub Desktop.

### GET POSTS // get some post from json placeholder GET https://jsonplaceholder.typicode.com/posts

### DEFAULT GET https://jsonplaceholder.typicode.com/posts

### POST POST https://jsonplaceholder.typicode.com/posts Content-Type: application/json

{
"title": "my post", "body": "my post body"

}

### GET SINGLE POST GET https://jsonplaceholder.typicode.com/posts/1

### DELETE POST DELETE https://jsonplaceholder.typicode.com/posts/1

### PUT POST PUT https://jsonplaceholder.typicode.com/posts/1 Content-Type: application/json

{
"title": "My Updated Title", "body": "My Updated Body"

}

## Query String GET https://jsonplaceholder.typicode.com/posts?_limit=10

### Multiple Query GET https://jsonplaceholder.typicode.com/posts?_limit=10&_page=2

### Separated by lines GET https://jsonplaceholder.typicode.com/posts

?_limit=10 &_page=2 &_sort=id &_order=desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment