forked from natenho/Mockaco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
adf45bd
commit 227436d
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,50 @@ the verification endpoint called in the following way: ```http://localhost:5000/ | |
|
||
Both JSON body and x-www-form-urlencoded body are supported. | ||
|
||
### Verify request with headers | ||
If you have just called ```http://localhost:5000/hello/Jane Doe```, with the following headers: | ||
``` | ||
x-user-id:[email protected] | ||
Authorization:some-bearer-token | ||
endtoend:b9802abd-106f-4d50-b68e-de3198777456 | ||
``` | ||
the verification endpoint called in the following way: ```http://localhost:5000/_mockaco/verification?route=/hello/Jane Doe``` will respond like so: | ||
``` | ||
{ | ||
"route": "/hello/Jane Doe", | ||
"timestamp": "14:41", | ||
"headers": [ | ||
{ | ||
"key": "x-user-id", | ||
"value": "[email protected]" | ||
}, | ||
{ | ||
"key": "Authorization", | ||
"value": "some-bearer-token" | ||
}, | ||
{ | ||
"key": "endtoend", | ||
"value": "b9802abd-106f-4d50-b68e-de3198777456" | ||
} | ||
], | ||
"body": "" | ||
} | ||
``` | ||
|
||
### Configure hidden headers in verification endpoint | ||
You can configure to not display headers that are not relevant to your test. By default the following headers will not be displayed: ```Accept, Connection, Host, User-Agent, Accept-Encoding, Postman-Token, Content-Type, Content-Length.``` | ||
|
||
``` | ||
"Mockaco": { | ||
... | ||
"HiddenHeaders": [ | ||
"Postman-Token", | ||
"Some-Irrelevant-Header", | ||
], | ||
... | ||
}, | ||
``` | ||
|
||
|
||
## Configure custom name of verification endpoint | ||
|
||
|