Split proxy.sh and proxy_option.sh

This commit is contained in:
jcamiel 2023-07-16 11:10:53 +02:00
parent 9823bd48d8
commit c5be0a88ea
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC
9 changed files with 17 additions and 2 deletions

View File

View File

@ -1,4 +1,3 @@
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'
hurl tests_ok/proxy.hurl --proxy localhost:3128 --verbose
hurl tests_ok/proxy_option.hurl --verbose

View File

@ -1,4 +1,3 @@
#!/bin/bash
set -Eeuo pipefail
hurl tests_ok/proxy.hurl --proxy localhost:3128 --verbose
hurl tests_ok/proxy_option.hurl --verbose

View File

@ -0,0 +1 @@
curl --proxy 'localhost:3128' 'http://127.0.0.1:8000/proxy'

View File

@ -0,0 +1,9 @@
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"></span><span class="comment"># Go through proxy</span>
<span class="line"></span><span class="comment"># The proxy adds header "From-Proxy:Hello" for both request and response</span>
<span class="line"><span class="method">GET</span> <span class="url">http://127.0.0.1:8000/proxy</span></span>
<span class="line"><span class="section-header">[Options]</span></span>
<span class="line"><span class="string">proxy</span>: <span class="string">localhost:3128</span></span>
</span><span class="response"><span class="line"><span class="version">HTTP</span> <span class="number">200</span></span>
<span class="line"><span class="string">From-Proxy</span>: <span class="string">Hello</span></span>
</span></span><span class="line"></span>
</code></pre>

View File

@ -0,0 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://127.0.0.1:8000/proxy","options":[{"name":"proxy","value":"localhost:3128"}]},"response":{"status":200,"headers":[{"name":"From-Proxy","value":"Hello"}]}}]}

View File

View File

@ -0,0 +1,3 @@
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'
hurl tests_ok/proxy_option.hurl --verbose

View File

@ -0,0 +1,3 @@
#!/bin/bash
set -Eeuo pipefail
hurl tests_ok/proxy_option.hurl --verbose