Skip to content

Commit d5ddcf8

Browse files
authored
Merge pull request #64 from dancier/feature/jetbrains-request-files
add first request files
2 parents fcddb03 + b7becf9 commit d5ddcf8

File tree

3 files changed

+98
-0
lines changed

3 files changed

+98
-0
lines changed

.requests/http-client.env.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"Lokal": {
3+
"baseUrl": "http://localhost:8080",
4+
"user": {
5+
"email": "1-test@dancier.net",
6+
"password": "CHANGEME"
7+
}
8+
},
9+
"Test (test.dancier.net)": {
10+
"baseUrl": "https://test-dancer.dancier.net",
11+
"user": {
12+
"email": "1-test@dancier.net",
13+
"password": "CHANGEME"
14+
}
15+
}
16+
}

.requests/profile.http

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
### Login (run once to retrieve access token)
2+
POST {{baseUrl}}/authentication/login
3+
Content-Type: application/json
4+
5+
{
6+
"email": "{{user.email}}",
7+
"password": "{{user.password}}"
8+
}
9+
> {% client.global.set("access_token", response.body.accessToken); %}
10+
11+
12+
### Get user's proile (and save it)
13+
GET {{baseUrl}}/profile
14+
Authorization: Bearer {{access_token}}
15+
16+
> {% client.global.set("profile", response.body.toString()); %}
17+
18+
19+
### Save user's profile
20+
PUT {{baseUrl}}/profile
21+
Content-Type: application/json
22+
23+
{
24+
"size": 130,
25+
"gender": "FEMALE",
26+
"birthDate": "1996-01-19",
27+
"ableTo": [
28+
{
29+
"dance": "Tango",
30+
"level": "BASIC",
31+
"leading": "LEAD"
32+
}
33+
],
34+
"wantsTo": [
35+
{
36+
"dance": "Tango",
37+
"level": "INTERMEDIATE",
38+
"leading": "FOLLOW"
39+
}
40+
],
41+
"email": "1-test@dancier.net",
42+
"zipCode": "10001",
43+
"city": "Hamburg",
44+
"country": "GER",
45+
"profileImageHash": "1a7efd460ee0be68011291c9f6b1ac5d9b03f9974b66c27b14e59887bf910f8c",
46+
"aboutMe": null
47+
}

.requests/register.http

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
### Perform Captcha to Login as Human
2+
POST {{baseUrl}}/authentication/loginAsHuman
3+
X-Captcha-Token: token
4+
5+
> {% client.global.set("access_token", response.body.accessToken); %}
6+
7+
### Perform initial registration
8+
POST {{baseUrl}}/authentication/registrations
9+
Content-Type: application/json
10+
11+
{
12+
"acceptTermsAndConditions": true,
13+
"email": "{{user.email}}",
14+
"password": "{{user.password}}"
15+
16+
}
17+
18+
### verify email
19+
PUT {{baseUrl}}/authentication/email-validations/asdf
20+
Authorization: Bearer {{access_token}}
21+
22+
### Login with new user
23+
POST {{baseUrl}}/authentication/login
24+
Content-Type: application/json
25+
26+
{
27+
28+
}
29+
30+
> {% client.global.set("access_token", response.body.accessToken); %}
31+
32+
33+
### Get user's profile
34+
GET {{baseUrl}}/profile
35+
Authorization: Bearer {{access_token}}

0 commit comments

Comments
 (0)