Public
Documentation Settings

StackOverflowClone - API

Answers

GETGET /posts/answers/:id

http://localhost:5000/posts/answers/1
Example Request
curl
curl --location 'http://localhost:5000/posts/answers/1'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POSTPOST /posts/answers/:id

http://localhost:5000/posts/answers/1
AUTHORIZATIONBearer Token
Token

<token>

HEADERS
x-auth-token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjo4fSwiaWF0IjoxNjM1NzE4NTM2LCJleHAiOjE2MzU3MjIxMzZ9.YgFcD6XqYRiapFswfazNvvLp5fxvRRm40F7TaRXZ7Vg

Bodyraw (json)
json
{
    "user": {
        "id": 8
    },
    "text": "Test answer"
}
Example Request
curl
curl --location 'http://localhost:5000/posts/answers/1' \
--header 'x-auth-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjo4fSwiaWF0IjoxNjM1NzE4NTM2LCJleHAiOjE2MzU3MjIxMzZ9.YgFcD6XqYRiapFswfazNvvLp5fxvRRm40F7TaRXZ7Vg' \
--data '{
    "user": {
        "id": 8
    },
    "text": "Test answer"
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

DELETEPOST /posts/answers/:id

http://localhost:5000/posts/answers/5
AUTHORIZATIONBearer Token
Token

<token>

HEADERS
x-auth-token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjo4fSwiaWF0IjoxNjM1NzE4NTM2LCJleHAiOjE2MzU3MjIxMzZ9.YgFcD6XqYRiapFswfazNvvLp5fxvRRm40F7TaRXZ7Vg

Bodyraw (json)
json
{
    "user": {
        "id": 8
    }    
}
Example Request
curl
curl --location --request DELETE 'http://localhost:5000/posts/answers/5' \
--header 'x-auth-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjo4fSwiaWF0IjoxNjM1NzE4NTM2LCJleHAiOjE2MzU3MjIxMzZ9.YgFcD6XqYRiapFswfazNvvLp5fxvRRm40F7TaRXZ7Vg' \
--data '{
    "user": {
        "id": 8
    }    
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

Comments