Courier reads and writes the JetBrains HTTP Client format, and the httpyac syntax where JetBrains defines nothing. You can edit everything through the app, so you only need this page when you write files by hand.
A file can hold several requests, each starting with ###.
| Directive |
What it does |
# @name login |
Names the request for chaining |
# @ref login |
Runs login first when needed |
# @forceRef login |
Runs login first every time |
# @disabled Header: value |
Keeps a header without sending it |
# @auth <kind> key=value … |
Auth that Courier signs. # @auth none opts out of folder auth |
# @assert <target> <op> [value] |
A check |
# @operationName Name |
The GraphQL operation to run |
# @snippet name text |
A saved WebSocket message |
# @proto ./file.proto |
The .proto for a gRPC request |
# @import-path ./dir |
A folder for the .proto file’s imports |
| Syntax |
Meaning |
< ./file |
Send a file’s bytes, or a file part in a multipart body |
=== |
Separates messages in WebSocket and gRPC streams |
=== wait-for-server |
Waits for a server message before sending the next one |
| Syntax |
Meaning |
< {% … %} before the request line |
A pre-request script |
> {% … %} after the body |
A response handler |
< ./setup.js, > ./check.js |
Run a script file instead |
See Scripts.
| Syntax |
Meaning |
{{name}} |
An environment, folder, runtime or data variable |
{{$uuid}}, {{$timestamp}}, {{$isoTimestamp}}, {{$randomInt}} |
Dynamic variables |
{{login.response.body.$.token}} |
A value from another request’s response |