mirror of
https://github.com/aykhans/sarin.git
synced 2026-10-12 20:58:52 +00:00
docs: drop the redirect login example, it cannot work (#235)
This commit is contained in:
1 file changed
-15
@@ -1193,21 +1193,6 @@ js: |
|
||||
}
|
||||
```
|
||||
|
||||
**Follow redirects and use a slower timeout for a login endpoint:**
|
||||
|
||||
```sh
|
||||
sarin -U http://example.com/api/me -r 200 -c 5 \
|
||||
-lua 'function transform(req)
|
||||
local res = http("http://example.com/login", {
|
||||
method = "POST",
|
||||
maxRedirects = 5,
|
||||
timeout = "10s",
|
||||
})
|
||||
req.cookies["session"] = res:cookie("session")
|
||||
return req
|
||||
end'
|
||||
```
|
||||
|
||||
**Keep sending the main request even when the extra call fails:**
|
||||
|
||||
A failed `http` call raises an error, which skips the main request and records the failure in the results. Catch it to decide yourself:
|
||||
|
||||
Reference in new issue
Block a user