Skip to content

Commit 0f4d3c3

Browse files
committed
add first request files
1 parent fcddb03 commit 0f4d3c3

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed

.requests/http-client.env.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"Lokal": {
3+
"baseUrl": "http://localhost:8080"
4+
},
5+
"Test (test.dancier.net)": {
6+
"baseUrl": "https://test-dancer.dancier.net"
7+
}
8+
}

.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": "1-test@dancier.net",
7+
"password": "secret"
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: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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": "4-bla@dancier.net",
14+
"password":"secret"
15+
}
16+
17+
### verify email
18+
PUT {{baseUrl}}/authentication/email-validations/asdf
19+
Authorization: Bearer {{access_token}}
20+
21+
### Login with new user
22+
POST {{baseUrl}}/authentication/login
23+
Content-Type: application/json
24+
25+
{
26+
27+
}
28+
29+
> {% client.global.set("access_token", response.body.accessToken); %}
30+
31+
32+
### Get user's profile
33+
GET {{baseUrl}}/profile
34+
Authorization: Bearer {{access_token}}

0 commit comments

Comments
 (0)