spec: Added titles to the handler key tree examples.
Co-authored-by: pancho horrillo <pedrofelipe.horrillo@bbva.com>
This commit is contained in:
+11
-11
@@ -352,28 +352,28 @@ following keys:
|
||||
|
||||
#### Example Keys
|
||||
|
||||
1.
|
||||
Scenario: Request URL is `http://localhost:8080/example?q=foo&r=bar`
|
||||
Key: `/request/path`
|
||||
Access: Read-Only
|
||||
Returned Value: `/example?q=foo&r=bar`
|
||||
Comment: That would provide read-only access to the request URL path.
|
||||
1. Read the request URL path.
|
||||
- Scenario: Request URL is `http://localhost:8080/example?q=foo&r=bar`
|
||||
- Key: `/request/path`
|
||||
- Access: Read-Only
|
||||
- Returned Value: `/example?q=foo&r=bar`
|
||||
- Comment: That would provide read-only access to the request URL path.
|
||||
|
||||
2.
|
||||
2. Read an specific URL parameter.
|
||||
Scenario: Request URL is `http://localhost:8080/example?q=foo&r=bar`
|
||||
Key: `/request/params/q`
|
||||
Access: Read-Only
|
||||
Returned Value: `foo`
|
||||
Comment: That would provide read-only access to the request URL parameter `q`.
|
||||
|
||||
3.
|
||||
3. Obtain the `Content-Type` header of the request.
|
||||
Scenario: A POST request with a JSON body and the header `Content-Type` set to `application/json`.
|
||||
Key: `/request/headers/Content-Type`
|
||||
Access: Read-Only
|
||||
Returned Value: `application/json`
|
||||
Comment: That would provide read-only access to the value of the request header `Content-Type`.
|
||||
|
||||
4.
|
||||
4. Read a field from a form.
|
||||
Scenario: A request generated by submitting this form:
|
||||
```
|
||||
<form method="post">
|
||||
@@ -389,7 +389,7 @@ following keys:
|
||||
Returned Value: `Jane`
|
||||
Comment: That would provide read-only access to the value of the field `firstname` of the form.
|
||||
|
||||
5.
|
||||
5. Set the response status code.
|
||||
Scenario: A request is being attended.
|
||||
Key: `/response/status`
|
||||
Access: Write-Only
|
||||
@@ -397,7 +397,7 @@ following keys:
|
||||
Default Value: 200
|
||||
Comment: It is customary to use the HTTP status code as defined at [https://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1.1](RFC2616).
|
||||
|
||||
6.
|
||||
6. Set the response body.
|
||||
Scenario: A request is being attended.
|
||||
Key: `/response/body`
|
||||
Access: Write-Only
|
||||
|
||||
Reference in New Issue
Block a user