Skip to content

Commit 533b415

Browse files
committed
update to readme
1 parent e5a4913 commit 533b415

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,13 @@ However, you can, of course, test everything using the standard API gateway endp
6666

6767
## Testing the application
6868

69-
The application supports non-auth API (Echo) and Auth API (Get, Post)
69+
The application supports non-auth API and Auth API, but by default, all APIs require Auth.
7070
Demos using [httpie](https://httpie.org/)
7171

72-
Echo API is straight forward:
73-
```bash
74-
> http https://sam.example.com/echo
7572

76-
{
77-
"message": "Hello, Worlds!"
78-
}
79-
80-
```
81-
82-
Get and Post both needs Authorization or you will get and Unauthorized notice.
73+
APIs needs Authorization or you will get and Unauthorized notice.
8374
```bash
84-
> http https://sam.example.com/get/foobar
75+
> http https://sam.example.com/echo
8576

8677
{
8778
"message": "Unauthorized"
@@ -94,9 +85,18 @@ We can login using the AWS CLI to retrieve a "IdToken" to our request in order t
9485
> cd script
9586
> sh login.sh {{UserPool Client ID}} {{Your Email}} "Testing1"
9687
```
97-
Copy the IdToken part and use it in the Authorization header for Get and Posts APIs.
88+
Copy the IdToken part and use it in the Authorization header.
9889

9990

91+
```bash
92+
> http https://sam.example.com/echo Authorization:<IdToken>
93+
94+
{
95+
"message": "Hello, Worlds!"
96+
}
97+
98+
```
99+
100100
```bash
101101
> http post https://sam.example.com/create Authorization:<IdToken> name=barfoo email=barfoo@foobar.com
102102

0 commit comments

Comments
 (0)