diff --git a/.gitignore b/.gitignore index 0db96e1..f5d40aa 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file +*.jtl +/.run/ diff --git a/support-portal-backend/requests.http b/support-portal-backend/requests.http new file mode 100644 index 0000000..2ca19d0 --- /dev/null +++ b/support-portal-backend/requests.http @@ -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 + + + + + diff --git a/support-portal-backend/src/test/resources/images/1.png b/support-portal-backend/src/test/resources/images/1.png new file mode 100644 index 0000000..a7b455e Binary files /dev/null and b/support-portal-backend/src/test/resources/images/1.png differ