Send the request
After setting up the request it can be sent to the server in a few different ways. Keep in mind that all configuration regarding the request must be done prior to any of the following steps, as they will actually send the request.
When I request :path
Request :path using HTTP GET. Shorthand for When I request :path using HTTP GET.
When I request :path using HTTP :method
:path is relative to the base_uri configuration option, and :method is any HTTP method, for instance POST or DELETE. If :path starts with a slash, it will be relative to the root of base_uri.
Examples:
Assume that the ``base_uri`` configuration option has been set to ``http://example.com/dir`` in the following examples.
Step |
|
|
Resulting URI |
|---|---|---|---|
When I request “ |
|
|
|
When I request “ |
|
|
|
When I request “ |
|
|
|