Commit Graph

8 Commits

Author SHA1 Message Date
David Diaz d3b78bc27d Added basic cookies support.
You can now let Beau know you expect cookies to be passed around by
setting COOKIEJAR to true. I'd eventually like to add support for file
storage or something similar.
2018-04-26 17:50:09 -06:00
David Diaz 9d10db3243 Added support for forms.
You can now pass a form key to the request and it'll set the header and
payload automatically.
2018-04-26 14:52:06 -06:00
David Diaz d15564a9e3 Modifiers can now edit request settings.
This gives a lot more flexibility when it comes to what a modifier can
do. They can now use any valid request option to change how the response
behaves.
2018-04-20 18:29:19 -06:00
David Diaz f13cbda84a Allow the escaping of variables.
This results in two important changes:

- Made changes so that we actually use the replacement regex groups.
This was supposed to happen from the start but I guess I didn't notice.
By fixing this the code for finding dependencies and the cache#parse is
now a bit more reliable.

- This also changes how we store variables in the cache (which I've been
meaning to do for a while.) removing the dollar sign that usually
preceeded all cached requests in Beau. It's all more sensible now.

There's more refactoring left to do.
2018-04-13 10:12:03 -06:00
David Diaz 1fb45da5de Refactored Beau's Plugin System
It now uses a plugin registry. Plugins are loaded when the configuration
file is first parsed. When a request is made it is passed over to the
available modifiers before and after it's execution and applies
whichever changes are made. It now passes a copy instead of a reference
to provide a nicer interface.

Dynamic values have been added as a plugin type. These plugins are
javascript functions that can be called from within the beau file and
whose results are used as a replacement.

These are added along with variables to the runtime execution flow. The
current order for their execution is:

Request composition -> Dynamic Values -> Pre-Request Modifiers ->
Post-Request Modifiers.
2018-04-08 13:33:43 -06:00
David Diaz 124d55d1ae Fixed issue where an empty payload was changed to an empty object. 2018-03-01 10:58:30 -06:00
David Diaz fe401c1391 Added support for multiple hosts.
This introduces a top level key: `hosts`. It's an array where you can
configure multiple hosts with their own requests, they share defaults
and environment with the global scope.

This allows you to  have multiple paths being the same with different
endpoints and settings.
2018-01-19 18:10:00 -06:00
David Diaz 44205d488c Moved all source files into a src folder. It was getting crowded. 2018-01-10 15:13:47 -06:00