Skip to content

Commit 180f6c8

Browse files
authored
Update README.md
1 parent ddc4cc0 commit 180f6c8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This component cannot be run by itself. In order to run this component, all of t
1212
### Making a POST Request
1313
New review can be posted to the system by invoking `POST` request to the URL **localhost:8080/users/{userId}/reviews**. For example, if you want to post a review for user with id 2, you should send a `POST` request to following URL path:
1414
```
15-
localhost:8080/users/{userId}/reviews
15+
localhost:8080/users/2/reviews
1616
```
1717

1818
A request body of the following form must be specified for the `POST` request:
@@ -29,18 +29,18 @@ Following header must be specified:
2929
Content-Type: application/json
3030
```
3131

32-
You can use the following command to post a new review to the system:
32+
You can use the following command to post a new review to the system for user with id 2:
3333
```
3434
curl -H 'Content-Type: application/json' -d '{
3535
"productId": "3",
3636
"score": 4.5,
3737
"timestamp": 10
38-
}' localhost:8080/users/3/reviews
38+
}' localhost:8080/users/2/reviews
3939
```
4040

4141
Output:
4242
```
43-
{"productId":"3","score":4.5,"timestamp":"1970-01-01T00:00:00.010+0000","userId":"3"}
43+
{"productId":"3","score":4.5,"timestamp":"1970-01-01T00:00:00.010+0000","userId":"2"}
4444
```
4545

4646
You can install `jq` and beautify the output as follows:
@@ -49,7 +49,7 @@ curl -H 'Content-Type: application/json' -d '{
4949
"productId": "3",
5050
"score": 4.5,
5151
"timestamp": 10
52-
}' localhost:8080/users/3/reviews | jq
52+
}' localhost:8080/users/2/reviews | jq
5353
```
5454

5555
Output:
@@ -58,7 +58,7 @@ Output:
5858
"productId": "3",
5959
"score": 4.5,
6060
"timestamp": "1970-01-01T00:00:00.010+0000",
61-
"userId": "3"
61+
"userId": "2"
6262
}
6363
```
6464

0 commit comments

Comments
 (0)