request file
A plain text file listing HTTP requests with their expected statuses, runnable by a small tool so a journey can be replayed and checked.
In more detail
Each block names a request, can declare the expected status and capture a value, such as a token, for later requests. Editors and tools such as the REST Client extensions use the same .http format.
Example
### the token opens the guarded route
# expect 200
GET {{base}}/private
Authorization: Bearer {{token}}Related terms
- functional test — A test that exercises a public journey the way a client would, by sending real requests and checking the observable results.
- curl — A command-line tool for sending web requests and printing the response.
Taught in
- OpenAPI And Design-First — Modern API Architecture: REST, GraphQL & gRPC
- Unit And Integration Testing — Modern API Architecture: REST, GraphQL & gRPC