50.3 Request samples for profile image (#50)
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@ -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/
|
||||
|
||||
40
support-portal-backend/requests.http
Normal file
40
support-portal-backend/requests.http
Normal 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
support-portal-backend/src/test/resources/images/1.png
Normal file
BIN
support-portal-backend/src/test/resources/images/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Reference in New Issue
Block a user