Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
crufter authored Nov 22, 2023
1 parent 2a14328 commit a760736
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ organization: "Admin Org
```
```sh
$ curl -XPOST -d '{"contactUrl":"example@example.com", "password":"admin"}' 127.0.0.1:8080/AuthenticationService/userLogin
$ curl -XPOST -H 'Content-Type: application/json' -d '{"contactUrl":"example@example.com", "password":"admin"}' 127.0.0.1:8080/AuthenticationService/userLogin
```
The response is:
Expand All @@ -115,7 +115,7 @@ The response is:
We can grab the `token` and call our endpoint which tries to read this user:
```sh
$ curl -XPOST -d '{"token":"4o11JVud5mIFiFWC0FrcA"}' 127.0.0.1:8080/MyService/myEndpoint
$ curl -XPOST -d -H 'Content-Type: application/json' '{"token":"4o11JVud5mIFiFWC0FrcA"}' 127.0.0.1:8080/MyService/myEndpoint
{"hi":"The Admin"}
```
Expand Down Expand Up @@ -180,15 +180,15 @@ Server is listening on port 8080
If we curl `myEndpoint`, it returns as expected:
```sh
$ curl -XPOST -d '{"name":"Johnny"}' 127.0.0.1:8080/MyService/myEndpoint
$ curl -XPOST -H 'Content-Type: application/json' -d '{"name":"Johnny"}' 127.0.0.1:8080/MyService/myEndpoint
{"hi":"Johnny"}
```
Curling `notMyEndpoint`, marked with the `@Unexposed` decorator returns a 404:
```sh
$ curl -XPOST -d '{"name":"Johnny"}' 127.0.0.1:8080/MyService/notMyEndpoint
$ curl -XPOST -H 'Content-Type: application/json' -d '{"name":"Johnny"}' 127.0.0.1:8080/MyService/notMyEndpoint
{"error":"endpoint not found"}
```
Expand Down Expand Up @@ -508,11 +508,11 @@ Now do a curl:
### cURL
```sh
curl -XPOST -d '{"name":"Johnny"}' 127.0.0.1:8080/MyService/myEndpoint
curl -XPOST -H 'Content-Type: application/json' -d '{"name":"Johnny"}' 127.0.0.1:8080/MyService/myEndpoint
```
The output should be:
```sh
{"hi":"Johnny"}
```
```

0 comments on commit a760736

Please sign in to comment.