2021-12-16 23:52:14 +03:00
|
|
|
GET http://bob:secret@localhost:8000/basic-authentication-per-request
|
|
|
|
HTTP/1.0 200
|
|
|
|
```You are authenticated```
|
|
|
|
|
|
|
|
GET http://localhost:8000/basic-authentication-per-request
|
2022-02-11 12:33:39 +03:00
|
|
|
Authorization: Basic Ym9iOnNlY3JldA== # Header value can be computed with `echo -n 'bob:secret' | base64`
|
2021-12-16 23:52:14 +03:00
|
|
|
HTTP/1.0 200
|
|
|
|
```You are authenticated```
|
|
|
|
|
2022-02-11 12:33:39 +03:00
|
|
|
# We can also use a BasicAuth section to specify user and password
|
|
|
|
# without any base64 encoding.
|
|
|
|
# Note that spaces surrounded user and password are trimmed. If you
|
|
|
|
# really want a space in your password (!!), you could use Hurl
|
|
|
|
# unicode literal \u{20}.
|
2021-12-16 23:52:14 +03:00
|
|
|
GET http://localhost:8000/basic-authentication-per-request
|
|
|
|
[BasicAuth]
|
2022-02-11 12:33:39 +03:00
|
|
|
bob: secret
|
2021-12-16 23:52:14 +03:00
|
|
|
HTTP/1.0 200
|
|
|
|
```You are authenticated```
|