50.3 Request samples for profile image (#50)

This commit is contained in:
Art
2023-01-12 16:38:11 +02:00
parent e8e92950aa
commit b643a21ff0
3 changed files with 43 additions and 2 deletions

5
.gitignore vendored
View File

@ -39,7 +39,7 @@ node_modules/
# Log file
*.log
# BlueJ files
# BlueJ fileshttp
*.ctxt
# Mobile Tools for Java (J2ME)
@ -60,4 +60,5 @@ hs_err_pid*
/typescript-training/**/*.js
# JMeter
*.jtl
*.jtl
/.run/

View File

@ -0,0 +1,40 @@
### Login
POST http://localhost:8080/user/login
Content-Type: application/json
Accept: application/json
{
"username": "amado.gislason",
"password": "bad_password"
}
> {%
client.global.set("access_token", response.headers.valueOf("Jwt-Token"));
client.global.set("userId", response.body.userId);
%}
### Update profile image
PUT http://localhost:8080/user/{{userId}}/profile-image
Authorization: Bearer {{access_token}}
Content-Type: multipart/form-data; boundary=WebAppBoundary
--WebAppBoundary
Content-Disposition: form-data; name="profileImage"; filename="1.png"
Content-Type: image/png
< ./src/test/resources/images/1.png
--WebAppBoundary--
### Get default profile image
GET http://localhost:8080/user/{{userId}}/profile-image
Accept: image/jpeg
### Get updated profile image
GET http://localhost:8080/user/{{userId}}/profile-image/avatar.jpg
Accept: image/jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB