From 31ae6ba19599394050fa6432a742c30d6807f84c Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Tue, 4 Oct 2016 21:10:42 +0200 Subject: [PATCH] Update README with useful information I hope it is useful... --- README.md | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fbd48be..575ab02 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,82 @@ -# WebAppTest +WebAppTest +========================= + Testing my skills + + +## Build application +mvn clean install -Pintegration + + +## Create runnable jar +mvn clean install assembly:single + + +## Run application +java -jar target/http-services-1.0-SNAPSHOT-jar-with-dependencies.jar + + +## Available URIs by means of Web Browser +http://localhost:8080/app/login/login.html +http://localhost:8080/app/pages/page_1.html +http://localhost:8080/app/pages/page_2.html +http://localhost:8080/app/pages/page_3.html +http://localhost:8080/app/login/logout.html + + +## Testing API, POSTMAN + +Retrieve user data as XML: + +GET /app/api/users/GUMARTIN HTTP/1.1 +Host: localhost:8080 +Authorization: Basic R1VNQVJUSU46bGFtZQ== +Accept: application/xml +Cache-Control: no-cache +Postman-Token: 7eb3642c-57a4-3d42-c455-b81cee18c010 + + +Retrieve user data as JSON: + +GET /app/api/users/GUMARTIN HTTP/1.1 +Host: localhost:8080 +Authorization: Basic VVNFUjFzc3M6Z29k +Accept: application/json +Cache-Control: no-cache +Postman-Token: 72935dcb-a57f-fc42-5795-a2fea96a4df4 + + +Create user, payload JSON: + +POST /app/api/users/ HTTP/1.1 +Host: localhost:8080 +Content-Type: application/json +Authorization: Basic R1VNQVJUSU46bGFtZQ== +Cache-Control: no-cache +Postman-Token: b844d75b-4df1-57da-d900-b84db477317d + +{ + "code": "USER3", + "name": "Gustavo", + "surname": "Martin Morcuende", + "password": "bobo", + "role": "ROLE_APP_ADMIN" +} + + +Create user, payload XML: + +POST /app/api/users/ HTTP/1.1 +Host: localhost:8080 +Content-Type: application/xml +Authorization: Basic R1VNQVJUSU46bGFtZQ== +Cache-Control: no-cache +Postman-Token: 7d8c92b4-3259-361d-8e32-2294534ea91e + + + USER4 + Gustavo + Martin Morcuende + pepe + ROLE_APP_PAGE_1 + -- 2.1.4