You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/org.restlet.tutorial.webapi/README.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,15 +43,15 @@ To simplify the launch of the application, authentication and authorization are
43
43
44
44
It uses HTTP Basic authentication. Learn more about authentication, authorization and security with Restlet Framework [here](http://restlet.com/learn/guide/2.3/core/security/).
45
45
46
-
You can try this application easily with a REST client like [POSTMAN](http://www.getpostman.com/).
46
+
You can interact with this application easily using a REST client like [POSTMAN](http://www.getpostman.com/).
47
47
48
48
## Database access
49
49
50
50
To visualize the database, open the H2 console in you browser (`http://localhost:8082`) and connect to the database with the JDBC URL `jdbc:h2:mem:restletWebApi;IFEXISTS=TRUE`.
51
51
52
52
## Description
53
53
54
-
This Web API contains 2 main resources:
54
+
This Web API contains 2 main resources:
55
55
* Company : identified by an auto-generated id.
56
56
* Contact : identified by its email. A contact can be part of a company and get a reference to it.
57
57
@@ -97,7 +97,7 @@ A resource `/ping` has been created which does not need authentication.
97
97
98
98
It should return the ```Version: 1.0.0 running``` text in the HTTP response body.
99
99
100
-
For the following examples, Basic Authentication is required.
100
+
For the following examples, Basic Authentication is required. Also, you should indicate the media type of the JSON document sent using a ```Content-Type: application/json``` HTTP header.
101
101
102
102
### Create a company
103
103
@@ -116,15 +116,13 @@ For the following examples, Basic Authentication is required.
116
116
}
117
117
```
118
118
119
-
The returned status is : `201 Created`. Note that the location of the created company is written is the "Location" HTTP header.
119
+
The returned status is : `201 Created`. Note that the location of the created company is written is the ```Location``` HTTP header.
120
120
121
121
### Retrieve all created companies
122
122
123
123
```GET http://localhost:9000/v1/companies/```
124
124
125
-
> The trailing slash is optional : both `http://localhost:9000/v1/companies/` and `http://localhost:9000/v1/companies` will work.
126
-
127
-
It should retrieve :
125
+
The trailing slash is optional : both `http://localhost:9000/v1/companies/` and `http://localhost:9000/v1/companies` will work. It should retrieve :
0 commit comments