Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,7 @@ will follow a redirection only for the second entry.
| <a href="#netrc-file" id="netrc-file"><code>--netrc-file &lt;FILE&gt;</code></a> | Like [`--netrc`](#netrc), but provide the path to the netrc file.<br><br>See also [`--netrc-optional`](#netrc-optional).<br> |
| <a href="#netrc-optional" id="netrc-optional"><code>--netrc-optional</code></a> | Similar to [`--netrc`](#netrc), but make the .netrc usage optional.<br><br>See also [`--netrc-file`](#netrc-file).<br> |
| <a href="#no-color" id="no-color"><code>--no-color</code></a> | Do not colorize output.<br><br>This is a cli-only option.<br> |
| <a href="#no-cookie-store" id="no-cookie-store"><code>--no-cookie-store</code></a> | Do not use cookie storage for requests/responses in a file. By default, requests in the same Hurl file share cookie storage, this option deactivates cookie engine.<br><br>This is a cli-only option.<br> |
| <a href="#no-output" id="no-output"><code>--no-output</code></a> | Suppress output. By default, Hurl outputs the body of the last response.<br><br>This is a cli-only option.<br> |
| <a href="#no-pretty" id="no-pretty"><code>--no-pretty</code></a> | Do not prettify response output for supported content type (JSON only for the moment). By default, output is prettified if<br>standard output is a terminal.<br><br>This is a cli-only option.<br> |
| <a href="#noproxy" id="noproxy"><code>--noproxy &lt;HOST(S)&gt;</code></a> | Comma-separated list of hosts which do not use a proxy.<br><br>Override value from Environment variable no_proxy.<br> |
Expand Down
1 change: 1 addition & 0 deletions completions/_hurl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ _hurl() {
'--netrc-file[Specify FILE for .netrc]: :_files' \
'--netrc-optional[Use either .netrc or the URL]' \
'--no-color[Do not colorize output]' \
'--no-cookie-store[Do not use cookie store between requests]' \
'--no-output[Suppress output. By default, Hurl outputs the body of the last response]' \
'--no-pretty[Do not prettify response output]' \
'--noproxy[List of hosts which do not use proxy]: :' \
Expand Down
1 change: 1 addition & 0 deletions completions/_hurl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Register-ArgumentCompleter -Native -CommandName 'hurl' -ScriptBlock {
[CompletionResult]::new('--netrc-file', 'netrc-file', [CompletionResultType]::ParameterName, 'Specify FILE for .netrc')
[CompletionResult]::new('--netrc-optional', 'netrc-optional', [CompletionResultType]::ParameterName, 'Use either .netrc or the URL')
[CompletionResult]::new('--no-color', 'no-color', [CompletionResultType]::ParameterName, 'Do not colorize output')
[CompletionResult]::new('--no-cookie-store', 'no-cookie-store', [CompletionResultType]::ParameterName, 'Do not use cookie store between requests')
[CompletionResult]::new('--no-output', 'no-output', [CompletionResultType]::ParameterName, 'Suppress output. By default, Hurl outputs the body of the last response')
[CompletionResult]::new('--no-pretty', 'no-pretty', [CompletionResultType]::ParameterName, 'Do not prettify response output')
[CompletionResult]::new('--noproxy', 'noproxy', [CompletionResultType]::ParameterName, 'List of hosts which do not use proxy')
Expand Down
2 changes: 1 addition & 1 deletion completions/hurl.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _hurl()
cur="${COMP_WORDS[COMP_CWORD]}"

if [[ $cur == -* ]]; then
COMPREPLY=($(compgen -W '--aws-sigv4 --cacert --cert --key --color --compressed --connect-timeout --connect-to --continue-on-error --cookie --cookie-jar --curl --delay --digest --error-format --file-root --location --location-trusted --from-entry --glob --header --http1.0 --http1.1 --http2 --http3 --ignore-asserts --include --insecure --interactive --ipv4 --ipv6 --jobs --json --limit-rate --max-filesize --max-redirs --max-time --negotiate --netrc --netrc-file --netrc-optional --no-color --no-output --no-pretty --noproxy --ntlm --output --parallel --path-as-is --pinnedpubkey --pretty --progress-bar --proxy --repeat --report-html --report-json --report-junit --report-tap --resolve --retry --retry-interval --secret --secrets-file --ssl-no-revoke --test --to-entry --unix-socket --user --user-agent --variable --variables-file --verbose --verbosity --very-verbose --help --version' -- "$cur"))
COMPREPLY=($(compgen -W '--aws-sigv4 --cacert --cert --key --color --compressed --connect-timeout --connect-to --continue-on-error --cookie --cookie-jar --curl --delay --digest --error-format --file-root --location --location-trusted --from-entry --glob --header --http1.0 --http1.1 --http2 --http3 --ignore-asserts --include --insecure --interactive --ipv4 --ipv6 --jobs --json --limit-rate --max-filesize --max-redirs --max-time --negotiate --netrc --netrc-file --netrc-optional --no-color --no-cookie-store --no-output --no-pretty --noproxy --ntlm --output --parallel --path-as-is --pinnedpubkey --pretty --progress-bar --proxy --repeat --report-html --report-json --report-junit --report-tap --resolve --retry --retry-interval --secret --secrets-file --ssl-no-revoke --test --to-entry --unix-socket --user --user-agent --variable --variables-file --verbose --verbosity --very-verbose --help --version' -- "$cur"))
return
fi
# Generate filenames by default
Expand Down
1 change: 1 addition & 0 deletions completions/hurl.fish
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ complete -c hurl -l netrc -d 'Must read .netrc for username and password'
complete -c hurl -l netrc-file -d 'Specify FILE for .netrc'
complete -c hurl -l netrc-optional -d 'Use either .netrc or the URL'
complete -c hurl -l no-color -d 'Do not colorize output'
complete -c hurl -l no-cookie-store -d 'Do not use cookie store between requests'
complete -c hurl -l no-output -d 'Suppress output. By default, Hurl outputs the body of the last response'
complete -c hurl -l no-pretty -d 'Do not prettify response output'
complete -c hurl -l noproxy -d 'List of hosts which do not use proxy'
Expand Down
4 changes: 3 additions & 1 deletion docs/entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ HTTP 200

### Cookie storage

Requests in the same Hurl file share the cookie storage, enabling, for example, session based scenario.
By default, requests in the same Hurl file share cookie storage, enabling session-based scenario. The shared cookie store can
be disabled with [`--no-cookie-store`] option.

### Redirects

Expand Down Expand Up @@ -251,3 +252,4 @@ For complete reference, below is a diagram for the executed entries.
[`repeat`]: /docs/manual.md#repeat
[`redirects` query]: /docs/asserting-response.md#redirects-assert
[`url` query]: /docs/asserting-response.md#url-assert
[`--no-coookie-store`]: /docs/manual.md#no-cookie-store
1 change: 1 addition & 0 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ will follow a redirection only for the second entry.
| <a href="#netrc-file" id="netrc-file"><code>--netrc-file &lt;FILE&gt;</code></a> | Like [`--netrc`](#netrc), but provide the path to the netrc file.<br><br>See also [`--netrc-optional`](#netrc-optional).<br> |
| <a href="#netrc-optional" id="netrc-optional"><code>--netrc-optional</code></a> | Similar to [`--netrc`](#netrc), but make the .netrc usage optional.<br><br>See also [`--netrc-file`](#netrc-file).<br> |
| <a href="#no-color" id="no-color"><code>--no-color</code></a> | Do not colorize output.<br><br>This is a cli-only option.<br> |
| <a href="#no-cookie-store" id="no-cookie-store"><code>--no-cookie-store</code></a> | Do not use cookie storage for requests/responses in a file. By default, requests in the same Hurl file share cookie storage, this option deactivates cookie engine.<br><br>This is a cli-only option.<br> |
| <a href="#no-output" id="no-output"><code>--no-output</code></a> | Suppress output. By default, Hurl outputs the body of the last response.<br><br>This is a cli-only option.<br> |
| <a href="#no-pretty" id="no-pretty"><code>--no-pretty</code></a> | Do not prettify response output for supported content type (JSON only for the moment). By default, output is prettified if<br>standard output is a terminal.<br><br>This is a cli-only option.<br> |
| <a href="#noproxy" id="noproxy"><code>--noproxy &lt;HOST(S)&gt;</code></a> | Comma-separated list of hosts which do not use a proxy.<br><br>Override value from Environment variable no_proxy.<br> |
Expand Down
8 changes: 7 additions & 1 deletion docs/manual/hurl.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH hurl 1 "21 Dec 2025" "hurl 7.2.0-SNAPSHOT" " Hurl Manual"
.TH hurl 1 "18 Jan 2026" "hurl 8.0.0-SNAPSHOT" " Hurl Manual"
.SH NAME

hurl - run and test HTTP requests.
Expand Down Expand Up @@ -370,6 +370,12 @@ Do not colorize output.

This is a cli-only option.

.IP "--no-cookie-store "

Do not use cookie storage for requests/responses in a file. By default, requests in the same Hurl file share cookie storage, this option deactivates cookie engine.

This is a cli-only option.

.IP "--no-output "

Suppress output. By default, Hurl outputs the body of the last response.
Expand Down
6 changes: 6 additions & 0 deletions docs/manual/hurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,12 @@ Do not colorize output.

This is a cli-only option.

### --no-cookie-store {#no-cookie-store}

Do not use cookie storage for requests/responses in a file. By default, requests in the same Hurl file share cookie storage, this option deactivates cookie engine.

This is a cli-only option.

### --no-output {#no-output}

Suppress output. By default, Hurl outputs the body of the last response.
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/hurlfmt.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH hurl 1 "21 Dec 2025" "hurl 7.2.0-SNAPSHOT" " Hurl Manual"
.TH hurl 1 "18 Jan 2026" "hurl 8.0.0-SNAPSHOT" " Hurl Manual"
.SH NAME

hurlfmt - format Hurl files
Expand Down
8 changes: 8 additions & 0 deletions docs/spec/options/hurl/no_cookie_store.option
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: no_cookie_store
long: no-cookie-store
help: Do not use cookie store between requests
help_heading: HTTP options
conflict: cookies_input_file
cli_only: true
---
Do not use cookie storage for requests/responses in a file. By default, requests in the same Hurl file share cookie storage, this option deactivates cookie engine.
2 changes: 1 addition & 1 deletion integration/hurl/tests_ok/cookie/cookie_file.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'

hurl --cookie tests_ok/cookie/cookie_file.cookies --verbose tests_ok/cookie/cookie_file.hurl
hurl --verbose --cookie tests_ok/cookie/cookie_file.cookies tests_ok/cookie/cookie_file.hurl
2 changes: 1 addition & 1 deletion integration/hurl/tests_ok/cookie/cookie_file.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -Eeuo pipefail

hurl --cookie tests_ok/cookie/cookie_file.cookies --verbose tests_ok/cookie/cookie_file.hurl
hurl --verbose --cookie tests_ok/cookie/cookie_file.cookies tests_ok/cookie/cookie_file.hurl
1 change: 1 addition & 0 deletions integration/hurl/tests_ok/cookie/cookies.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ cookie "UPPERCASE[Secure]" exists
cookie "UPPERCASE[HttpOnly]" exists
cookie "UPPERCASE[SameSite]" == "Strict"


# Check that expires attribute value is parsed successfully
GET http://localhost:8000/cookies/expires
HTTP 200
Expand Down
2 changes: 2 additions & 0 deletions integration/hurl/tests_ok/help/help.out.pattern
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ HTTP options:
Maximum time allowed for the transfer [default: 300]
--negotiate
Tell Hurl to use Negotiate (SPNEGO) authentication
--no-cookie-store
Do not use cookie store between requests
--noproxy <HOST(S)>
List of hosts which do not use proxy
--ntlm
Expand Down
20 changes: 20 additions & 0 deletions integration/hurl/tests_ok/no_cookie_store/no_cookie_store.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
GET http://localhost:8000/no_cookie_store/set
HTTP 200
[Asserts]
header "Set-Cookie" exists
header "Set-cookie" == "foo=1234; Expires=Mon, 12 Jan 2026 22:23:01 GMT; Path=/no_cookie/check"
# Even with --no-cookie `cookie` assert is working as it's syntax sugar over
# `Set-Cookie` response header .
cookie "foo" == "1234"
cookie "foo[Path]" == "/no_cookie/check"
cookie "foo[Expires]" dateFormat "%a, %d %b %Y %H:%M:%S" == "Mon, 12 Jan 2026 22:23:01"


GET http://localhost:8000/no_cookie_store/check
HTTP 200


GET http://localhost:8000/no_cookie_store/request_with_cookie
[Cookies]
color: blue
HTTP 200
4 changes: 4 additions & 0 deletions integration/hurl/tests_ok/no_cookie_store/no_cookie_store.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'

hurl --no-cookie-store tests_ok/no_cookie_store/no_cookie_store.hurl
26 changes: 26 additions & 0 deletions integration/hurl/tests_ok/no_cookie_store/no_cookie_store.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from app import app
from flask import make_response, request


@app.route("/no_cookie_store/set")
def no_cookie_store_set():
resp = make_response()
resp.set_cookie(
"foo",
"1234",
path="/no_cookie/check",
expires="Mon, 12 Jan 2026 22:23:01 GMT",
)
return resp


@app.route("/no_cookie_store/check")
def no_cookie_store_check():
assert "foo" not in request.cookies
return ""


@app.route("/no_cookie_store/request_with_cookie")
def no_cookie_store_request_with_cookie():
assert request.cookies["color"] == "blue"
return ""
4 changes: 4 additions & 0 deletions integration/hurl/tests_ok/no_cookie_store/no_cookie_store.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -Eeuo pipefail

hurl --no-cookie-store tests_ok/no_cookie_store/no_cookie_store.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
* ------------------------------------------------------------------------------
* Executing entry 1
*
* Cookie store:
*
* Request:
* GET http://localhost:8000/no_cookie_store/set
*
* Request can be run with the following curl command:
* curl 'http://localhost:8000/no_cookie_store/set'
*
> GET /no_cookie_store/set HTTP/1.1
> Host: localhost:8000
> Accept: */*
> User-Agent: hurl/<<<.*?>>>
>
* Response: (received 0 bytes in <<<\d+>>> ms)
*
< HTTP/1.1 200 OK
< Content-Length: 0
< Content-Type: text/html; charset=utf-8
< Date: <<<.*?>>>
< Server: Flask Server
< Set-Cookie: foo=1234; Expires=<<<.*?>>>; Path=/no_cookie/check
< Via: waitress
<
*
* ------------------------------------------------------------------------------
* Executing entry 2
*
* Cookie store:
*
* Request:
* GET http://localhost:8000/no_cookie_store/check
*
* Request can be run with the following curl command:
* curl 'http://localhost:8000/no_cookie_store/check'
*
> GET /no_cookie_store/check HTTP/1.1
> Host: localhost:8000
> Accept: */*
> User-Agent: hurl/<<<.*?>>>
>
* Response: (received 0 bytes in <<<\d+>>> ms)
*
< HTTP/1.1 200 OK
< Content-Length: 0
< Content-Type: text/html; charset=utf-8
< Date: <<<.*?>>>
< Server: Flask Server
< Via: waitress
<
*
* ------------------------------------------------------------------------------
* Executing entry 3
*
* Cookie store:
*
* Request:
* GET http://localhost:8000/no_cookie_store/request_with_cookie
* [Cookies]
* color=blue
*
* Request can be run with the following curl command:
* curl --cookie 'color=blue' 'http://localhost:8000/no_cookie_store/request_with_cookie'
*
> GET /no_cookie_store/request_with_cookie HTTP/1.1
> Host: localhost:8000
> Accept: */*
> Cookie: color=blue
> User-Agent: hurl/<<<.*?>>>
>
* Response: (received 0 bytes in <<<\d+>>> ms)
*
< HTTP/1.1 200 OK
< Content-Length: 0
< Content-Type: text/html; charset=utf-8
< Date: <<<.*?>>>
< Server: Flask Server
< Via: waitress
<
*
* Writing cookies to build/no_cookie_store_output.txt
Loading
Loading