fix docs links

This commit is contained in:
debugtalk
2017-08-23 12:31:48 +08:00
parent 4ab0c5f3bc
commit b7b76c4849
2 changed files with 22 additions and 14 deletions

View File

@@ -31,16 +31,24 @@ For instance, if we want to get `Content-Type` in response headers, then we can
There might be slight difference on list, cos we can use index to locate list item. For example, `Guangzhou` in response content can be specified by `content.person.cities.0`.
```text
{"resp_status_code": "status_code"},
{"resp_headers_content_type": "headers.content-type"},
{"resp_content_body_success": "body.success"},
{"resp_content_content_success": "content.success"},
{"resp_content_text_success": "text.success"},
{"resp_content_person_first_name": "content.person.name.first_name"},
{"resp_content_cities_1": "content.person.cities.1"}
# get status code
status_code
# get headers field
headers.content-type
# get content field
body.success
content.success
text.success
content.person.name.first_name
content.person.cities.1
```
```yaml
extract_binds:
- content_type: headers.content-type
- first_name: content.person.name.first_name
validators:
- {"check": "status_code", "comparator": "eq", "expected": 200}
- {"check": "headers.content-type", "expected": "application/json"}