mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-27 16:26:40 +03:00
Add integration test for 308 redirect
This commit is contained in:
parent
d32d492387
commit
cef2e80c1a
@ -1 +1,2 @@
|
||||
curl --location 'http://localhost:8000/follow-redirect'
|
||||
curl --location --request POST 'http://localhost:8000/follow-redirect-308'
|
||||
|
@ -1,5 +1,8 @@
|
||||
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/follow-redirect</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">`Followed redirect!`</span></span>
|
||||
</span></span><span class="line"></span>
|
||||
</code></pre>
|
||||
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
|
||||
<span class="line"><span class="method">POST</span> <span class="url">http://localhost:8000/follow-redirect-308</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">`Followed redirect POST!`</span></span>
|
||||
</span></span></code></pre>
|
||||
|
@ -2,3 +2,6 @@ GET http://localhost:8000/follow-redirect
|
||||
HTTP 200
|
||||
`Followed redirect!`
|
||||
|
||||
POST http://localhost:8000/follow-redirect-308
|
||||
HTTP 200
|
||||
`Followed redirect POST!`
|
||||
|
@ -1 +1 @@
|
||||
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/follow-redirect"},"response":{"status":200,"body":{"type":"text","value":"Followed redirect!"}}}]}
|
||||
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/follow-redirect"},"response":{"status":200,"body":{"type":"text","value":"Followed redirect!"}}},{"request":{"method":"POST","url":"http://localhost:8000/follow-redirect-308"},"response":{"status":200,"body":{"type":"text","value":"Followed redirect POST!"}}}]}
|
||||
|
@ -1 +1 @@
|
||||
Followed redirect!
|
||||
Followed redirect POST!
|
@ -25,3 +25,13 @@ def following_redirect():
|
||||
@app.route("/followed-redirect")
|
||||
def followed_redirect():
|
||||
return "Followed redirect!"
|
||||
|
||||
|
||||
@app.route("/followed-redirect-post", methods=["POST"])
|
||||
def followed_redirect_post():
|
||||
return "Followed redirect POST!"
|
||||
|
||||
|
||||
@app.route("/follow-redirect-308", methods=["POST"])
|
||||
def follow_redirect_308():
|
||||
return redirect("http://localhost:8000/followed-redirect-post", code=308)
|
||||
|
Loading…
Reference in New Issue
Block a user