-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrest-test.http
41 lines (30 loc) · 1.64 KB
/
rest-test.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# For a quick start check out our HTTP Requests collection (Tools|HTTP Client|Open HTTP Requests Collection).
#
# Following HTTP Request Live Templates are available:
# * 'gtrp' and 'gtr' create a GET request with or without query parameters;
# * 'ptr' and 'ptrp' create a POST request with a simple or parameter-like body;
# * 'mptr' and 'fptr' create a POST request to submit a form with a text or file field (multipart/form-data);
### Get JWKS
GET http://localhost:3000/.well-known/jwks.json
### Register user
POST http://localhost:3000/api/auth/register
Content-Type: application/json
{ "username": "[email protected]", "password": "password" }
### Login user and get access token
POST http://localhost:3000/api/auth/login
Content-Type: application/json
{ "username": "[email protected]", "password": "password" }
### Get Cats using REST endpoint
GET http://localhost:3000/api/cats/getCats
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjhlNzZkZWE4NmRmMzcwNzQzMmU3ZmI5YjRlOTBkNzYxYzJiYjYwZjNiNWEzY2RjZmUwNmY3N2MzMTdjYjg4NDYifQ.eyJpYXQiOjE1NDM0NzUxNTYsImV4cCI6MTU0MzQ3ODc1Niwic3ViIjoidGVzdEBleGFtcGxlLmNvbSJ9.iAEyH6cwv1PVMMtlxKf_Bz3uFErOrcpdNGZvLvesxdd7FHn1bewk9W9sbXOg66GBr8rqs1YdALWwiljcf8t7zw
Content-Type: application/json
### Get Cats using graphql
POST http://localhost:3000/graphql
content-type: application/json
{"operationName":null,"variables":{},"query":"{\n getCats {\n id\n name\n age\n }\n}\n"}
### Get Cats using graphql with auth
POST http://localhost:3000/graphql
content-type: application/json
Authorization: Bearer
{"operationName":null,"variables":{},"query":"{\n getCats {\n id\n name\n age\n }\n}\n"}
###