Link Search Menu Expand Document

Getting Started

just create a file: http_get.yaml

title: example
description: a simple example
request:
  method: get
  url: 'http://httpbin.org/get'
assert:
  status: ok
  statusCode: 200
  contentLength_gt: 180
  contentType: application/json

then run the fetch

$ ./fetch run http_get.yaml

the title and description are not required

request:
  method: get
  url: 'http://httpbin.org/get'
assert:
  status: ok
  statusCode: 200
  contentLength_gt: 180
  contentType: application/json

also, you can add more than one case in the yaml(note: separated by three dashes ---)

request:
  method: get
  url: 'http://httpbin.org/get'
assert:
  status: ok
  statusCode: 200
  contentLength_gt: 180
  contentType: application/json
---
request:
  method: get
  url: 'http://httpbin.org/get'
assert:
  status: ok
  statusCode: 200
  contentLength_gt: 180
  contentType: application/json

If you want to know more about how to use fetch, see Usage