spec: Added titles to the handler key tree examples.

Co-authored-by: pancho horrillo <pedrofelipe.horrillo@bbva.com>
This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-05-22 14:47:37 +02:00
parent 87dd0b2f6d
commit c3ab9d54de
+11 -11
View File
@@ -352,28 +352,28 @@ following keys:
#### Example Keys #### Example Keys
1. 1. Read the request URL path.
Scenario: Request URL is `http://localhost:8080/example?q=foo&r=bar` - Scenario: Request URL is `http://localhost:8080/example?q=foo&r=bar`
Key: `/request/path` - Key: `/request/path`
Access: Read-Only - Access: Read-Only
Returned Value: `/example?q=foo&r=bar` - Returned Value: `/example?q=foo&r=bar`
Comment: That would provide read-only access to the request URL path. - 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` Scenario: Request URL is `http://localhost:8080/example?q=foo&r=bar`
Key: `/request/params/q` Key: `/request/params/q`
Access: Read-Only Access: Read-Only
Returned Value: `foo` Returned Value: `foo`
Comment: That would provide read-only access to the request URL parameter `q`. 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`. Scenario: A POST request with a JSON body and the header `Content-Type` set to `application/json`.
Key: `/request/headers/Content-Type` Key: `/request/headers/Content-Type`
Access: Read-Only Access: Read-Only
Returned Value: `application/json` Returned Value: `application/json`
Comment: That would provide read-only access to the value of the request header `Content-Type`. 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: Scenario: A request generated by submitting this form:
``` ```
<form method="post"> <form method="post">
@@ -389,7 +389,7 @@ following keys:
Returned Value: `Jane` Returned Value: `Jane`
Comment: That would provide read-only access to the value of the field `firstname` of the form. 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. Scenario: A request is being attended.
Key: `/response/status` Key: `/response/status`
Access: Write-Only Access: Write-Only
@@ -397,7 +397,7 @@ following keys:
Default Value: 200 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). 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. Scenario: A request is being attended.
Key: `/response/body` Key: `/response/body`
Access: Write-Only Access: Write-Only