mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
Add docs for http resource options
Signed-off-by: Nathan L Smith <smith@chef.io>
This commit is contained in:
parent
58baf5f378
commit
0f96c88d88
1 changed files with 6 additions and 3 deletions
|
@ -14,7 +14,7 @@ This will be corrected in a future version of InSpec. New InSpec releases are po
|
|||
|
||||
An `http` resource block declares the configuration settings to be tested:
|
||||
|
||||
describe http('url', auth: {user: 'user', pass: 'test'}, params: {params}, method: 'method', headers: {headers}, body: body) do
|
||||
describe http('url', auth: {user: 'user', pass: 'test'}, params: {params}, method: 'method', headers: {headers}, data: data, open_timeout: 60, read_timeout: 60, ssl_verify: true) do
|
||||
its('status') { should eq number }
|
||||
its('body') { should eq 'body' }
|
||||
its('headers.name') { should eq 'header' }
|
||||
|
@ -23,11 +23,14 @@ An `http` resource block declares the configuration settings to be tested:
|
|||
where
|
||||
|
||||
* `('url')` is the url to test
|
||||
* `{user: 'user', pass: 'test'}` may be specified for basic auth request
|
||||
* `auth: { user: 'user', pass: 'test' }` may be specified for basic auth request
|
||||
* `{params}` may be specified for http request parameters
|
||||
* `'method'` may be specified for http request method (default to 'GET')
|
||||
* `{headers}` may be specified for http request headers
|
||||
* `body` may be specified for http request body
|
||||
* `data` may be specified for http request body
|
||||
* `open_timeout` may be specified for a timeout for opening connections (default to 60)
|
||||
* `read_timeout` may be specified for a timeout for reading connections (default to 60)
|
||||
* `ssl_verify` may be specified to enable or disable verification of SSL certificates (default to `true`)
|
||||
|
||||
## Matchers
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue