Command Line Interface for *.http and *.rest files
This program is used to execute *.http files on the command line. These can be created most easily with vscode-httpyac.
@user = doe
@password = 12345678
GET https://httpbin.org/basic-auth/{{user}}/{{password}}
Authorization: Basic {{user}} {{password}}
fragment IOParts on Repository {
description
diskUsage
}
POST https://api.github.com/graphql
Content-Type: application/json
Authorization: Bearer {{git_api_key}}
query test($name: String!, $owner: String!) {
repository(name: $name, owner: $owner) {
name
fullName: nameWithOwner
...IOParts
forkCount
stargazers(first: 5) {
totalCount
nodes {
login
name
}
}
watchers {
totalCount
}
}
}
{
"name": "vscode-httpyac",
"owner": "AnWeber"
}
A complete specification / documentation can be found here
> httpyac --help
--all execute all regions in a http file
--timeout maximum time allowed for connections
-e --env list of environemnts
-h --help help
--insecure allow insecure server connections when using ssl
-l --line line of the region
-n --name name of the region
-r --repeat repeat count for requests
--repeat-mode repeat mode: sequential, parallel (default)
--root absolute path to root dir of project
-v --verbose make the operation more talkative
To load the environment variables, the root folder of the project is automatically searched. The root folder is determined where a package.json
, .httpyac.json
or a folder env
is searched.
The program can be configured either in the .httpyac.json
file or in the package.json
in the httpyac key
. This interfaces describes all supported settings.
See CHANGELOG here