mirror of https://github.com/docker/docs.git
commit
cfacbc02e4
|
@ -81,9 +81,7 @@ Again, let’s make sure that our container is running properly. Run the same cu
|
|||
$ curl --request POST \
|
||||
--url http://localhost:8000/test \
|
||||
--header 'content-type: application/json' \
|
||||
--data '{
|
||||
"msg": "testing"
|
||||
}'
|
||||
--data '{"msg": "testing"}'
|
||||
{"code":"success","payload":[{"msg":"testing","id":"dc0e2c2b-793d-433c-8645-b3a553ea26de","createDate":"2020-09-01T17:36:09.897Z"}]}
|
||||
```
|
||||
|
||||
|
|
|
@ -49,9 +49,7 @@ Now let’s test our application by POSTing a JSON payload and then make an HTTP
|
|||
$ curl --request POST \
|
||||
--url http://localhost:8000/test \
|
||||
--header 'content-type: application/json' \
|
||||
--data '{
|
||||
"msg": "testing"
|
||||
}'
|
||||
--data '{"msg": "testing"}'
|
||||
```
|
||||
|
||||
Now, perform a GET request to the same endpoint to make sure our JSON payload was saved and retrieved correctly. The “id” and “createDate” will be different for you.
|
||||
|
|
Loading…
Reference in New Issue