Skip to content

Real‐World Examples

Fernando Prieto Moyano edited this page Dec 27, 2025 · 1 revision

Real-World Examples

Testing a REST API

"GET https://jsonplaceholder.typicode.com/posts/1"

"POST to https://jsonplaceholder.typicode.com/posts with JSON body {
  title: 'My Post',
  body: 'This is the content',
  userId: 1
}"

"PUT to https://jsonplaceholder.typicode.com/posts/1 with body {
  title: 'Updated Title'
}"

"DELETE https://jsonplaceholder.typicode.com/posts/1"

Authentication Flow

"POST to https://api.example.com/auth/login with body {
  email: 'user@example.com',
  password: 'secret123'
}"

"GET https://api.example.com/profile with header Authorization: Bearer <token-from-previous-response>"

Form Submission

"POST to https://api.example.com/contact with bodyType FORM_DATA and body {
  name: 'John Doe',
  email: 'john@example.com',
  message: 'Hello World'
}"

GraphQL API

"Query GraphQL at https://api.github.com/graphql with header Authorization: Bearer YOUR_TOKEN and query:
{
  viewer {
    login
    name
    repositories(first: 5) {
      nodes {
        name
        stargazerCount
      }
    }
  }
}"

Clone this wiki locally