ResponseMate
ResponseMate is a command line tool that aims to make inspecting and recording HTTP requests/responses. It is designed with APIs in mind.
It is a cli supplement/replacement of postman
Install
gem install response_mate
Usage
For a list of available commands run response_mate help
For help on a command run response_mate help some_command
Setup
A specific directory structure must be present to store the recordings.
To scaffold it do:
response_mate setup
ResponseMate's tasks heavily depend on a manifest file where you declare
the requests to be made. The default expected filename of this manifest
is requests.yml.
Example:
default_headers:
accept: 'application/vnd.{{app_name}}.beta+json'
requests:
-
key: user_issues
request:
url: 'http://someapi.com/users/42/issues
-
key: user_friends
request:
url: 'http://someapi.com/users/42/friends'
params:
since: 'childhood'
honest: '{{are_my_friends_host}}'
Expressions inside {{}} will be evaluated as Mustache templates using
values from a file environment.yml that may be present.
Record
Default
Record all the keys of the requests manifest file being requests.yml
response_mate record
Specific key(s)
response_mate record -k key1 key2
Specify a different request manifest
response_mate record -r foo_api.yml
Clear
Remove any existing recordings
response_mate clear
Inspect
Performs the request and displays the output without recording
response_mate inspect some_key
List
Lists existing recordings
response_mate list
Export
Exports a requests manifest file to a different format (currently only postman is supported)
response_mate export
Export in pretty json
response_mate export -f postman -p
Specify a different request manifest
response_mate export -f postman -r foo_api.yml
Export the environment.yml
response_mate export --resource=environment
Upload the exported and get a link
response_mate export --resource=environment --upload
List of contributors
Licence
Released under the MIT License. See the LICENSE file for further details.



