Hurl for Curl - heathdbrown/research GitHub Wiki
Hurl
Windows Installation
- Requires Visual C++ Redistributable Version
- Download and install Visual C++
winget install hurl
Cargo Install
cargo install hurl
Basic command
hurl test.hurl
hurl test.hurl —-test
Hurl File
Basic Example with 'test'
This checks that there is a 200 returned
#test.hurl
GET http://httpbin.org
HTTP 200
Authentication with headers
adds in authentication via HTTP headers
#test-auth.hurl
GET http://httpbing.org
X-HTTP-API-USER: user
X-HTTP-API-TOKEN: token
Basic auth
GET http://httpbing.org
[BasicAuth]
bob: secret
Using variables for sensitive items
hurl ./ --variable user=user token=token
hurl ./ --variables-file hurl.env
export HURL_user=user
export HURL_token=token
#hurl.evn
user=user
token=token
#test-auth.hurl
GET http://httpbing.org
X-HTTP-API-USER: {{user}}
X-HTTP-API-TOKEN: {{token}}
GET http://httpbing.org
[BasicAuth]
{{user}}: {{secret}}
# Resources
- [Hurl](https://hurl.dev/#whats-hurl)