Lacks an HTTP client step library
It would be helpful for Subplot to have a lib/http
step library, for testing web sites and web APIs. Steps might include ones like these:
- given an http server at {url}
- given http request header {name}: {value}
- given http request body {body}
- when I request GET {path}
- when I request POST {path}
- then http status is {code}
- then http response has header {name}: {value}
- then http body contains "{text}"
- then http body doesn't contain "{text}"
- then http body matches file {filename}
- then http body, as JSON, matches file {filename}
We probably want to write and use such a library outside of Subplot first, but mostly it should be pretty similar to lib/runcmd
in spirit.