Hand-curate your artisanal REST requests more easily.
Hand-craft your artisinal REST requests more easily.
Benzo makes the process of building and iterating on common request types easy by providing a few features:
Install using pip:
pip install benzo
You can just run benzo, but the real power comes when using either sessions or one of the built-in templates.
You can save a session for your request by using the --session=<path to file> command-line argument. When using a session, future requests using the same session file will continue with not only the same actual session (including any cookies the server you connected to previously sent down), but the editor when opened will show you exactly the request you made previously. This makes it very easy to iterate on a particularly tricky request.
You can use a request template by using the --template=<template name> command-line argument. Available templates include:
Request templates will generally contain a variety of parameters displayed at the top of your editor as comments. Parameters usually will include things like Method and URL, but individual templates may provide additional parameters. These parameters can be edited to alter your request’s behavior before being dispatched.
Request templates will usually contain a list of extra headers displayed near the top of your editor as comments starting with the proword [Header]. You can alter or add additional headers at-will; just make sure to keep the proword [Header] at the beginning of the line so benzo knows which lines to interpret as headers.
If you would like to abort making a request once your editor is opened, just delete all content from the file, save, and quit.
You do not need to provide any special configuration details, but you can fine-tune the behavior of benzo by adding configuration settings to your ~/.benzo file’s [benzo] section.
Note that individual templates may define extra configuration settings; see Templates for more information.