httpYac compatibility
What of the httpYac .http format apigenie test reads, and what it does with the rest.
Supported
| Feature | Notes |
|---|---|
### regions with titles, # and // comments |
|
GRPC requests |
Every method of the .proto file of --spec (streams of messages separated by ===), over HTTP/2 (cleartext, or TLS for grpcs://); proto < lines are ignored with a warning |
Request line with or without method and HTTP version, multi-line query (?, &) |
|
Headers, inline bodies, < file and <@ file bodies |
<@utf8 file: the encoding is ignored |
@name = value variables |
Outside of requests (file) or in a request’s region |
{{name}}, {{$uuid}}, {{$timestamp}}, {{$datetime}}, {{$randomInt}}, {{$processEnv}}, {{$dotenv}} |
See Environments and variables |
# @name, # @ref, # @forceRef, # @disabled |
Named responses are kept per file |
{{ }} scripts before and after the request |
exports, test, assert, console, request, response |
JetBrains < {% %} and > {% %} handlers |
client.global, client.test, client.assert, client.log, request.variables |
?? assertions |
status, header, body, duration and js subjects |
WS and WEBSOCKET requests |
ws:// and wss://; headers go with the handshake; text messages |
MQTT requests |
mqtt:// and mqtts://, MQTT 3.1.1; topic, publish, subscribe, qos, retain, clientId, keepAlive, clean, username and password headers |
=== and === wait-for-server between messages |
|
.env, .env.NAME, http-client.env.json, http-client.private.env.json |
$shared and the --env environment |
Authorization: Basic user:password |
Encoded before sending |
Authorization: oauth2 and openid with the client_credentials, password and refresh_token grants |
See OAuth 2; refresh_token and OpenID Connect discovery are apigenie’s additions |
GRAPHQL requests, POST requests of a query |
Variables after a blank line; # @operation is the operationName; subscriptions over graphql-ws |
Not supported yet
| Feature | What happens |
|---|---|
Server-sent events (SSE), AMQP |
Not request lines |
gql fragment imports (# @import ./fragments.gql) |
A warning; the request runs without them |
GraphQL subscriptions over the legacy graphql-ws subprotocol or SSE |
The request fails: only graphql-transport-ws is spoken |
| MQTT 5, client certificates | MQTT is 3.1.1; no certificate of the client is sent |
# @keepStreaming, binary WebSocket messages sent |
A warning; messages are sent as text |
| Redirects | Not followed: a 3xx response is checked as it is |
OAuth 2 and OpenID authorization_code, implicit and device_code grants, token exchange, oauth2_keepAlive, oauth2_interceptRequest |
The request is skipped with a warning (the variables are ignored) |
| AWS and digest authorization | The request is skipped with a warning |
# @import, # @loop, # @sleep, # @jwt, # @keepStreaming, other directives |
A warning; the request runs |
xpath assertions, sha256/md5 predicates |
A warning; the assertion is ignored |
Offsets of $datetime and $timestamp, $localDatetime time zones |
A warning; the current time in UTC is used |
{{ expression }} JavaScript inside a line, global {{ }} scripts outside of requests |
Not evaluated (the latter with a warning) |
require(), npm packages, client.exit() in scripts |
The script fails |
Response handler files (> ./handler.js) |
A warning |
Changes a pre-request script makes to request |
Not sent for ordinary files; marked imports support pm.request.headers.add |
.httpyac.js, .httpyac.json, httpyac.config.js |
Not read |
| Cookie jars | No cookies are kept between requests |
Was this helpful?