Butter 1.2.14
Helps ease HTTP requests through a stack of middleware

Butter is a library that helps ease HTTP requests through a stack of middleware.

Butter is a replacement for web::WebClient providing an extensible chain of middleware for making repeated HTTP requests and processing the responses. The adoption of the Middleware pattern allows you to seamlessly enhance and modify the behaviour of your HTTP requests.

Features above and beyond Fantom's default WebClient:

  • Instances may be re-used for multiple requests
  • Automatic support for Cookies and sessions
  • Throws Err on 40x & 50x response codes (configurable)
  • Utility classes for commonly used HTTP headers
  • Proper support for 303 redirects

Butter was inspired by Ruby's Faraday library.

Read more...

Install

To install Butter with Fantom Pod Manager, cut'n'paste the following into a cmd prompt, terminal or shell:

Or to install Butter with the Fantom Repository Manager (fanr), cut'n'paste the following into a cmd prompt, terminal or shell:

Or to install manually, download the pod file and copy it to the %FAN_HOME%/lib/fan/ directory.

afButter.pod (108.83 kB)

Use

To use Butter in a Fantom project, add a dependency to the project's build.fan:

depends = ["sys 1.0", ..., "afButter 1.2.14 - 1.2"]

Documentation

Information

Meta information on the Butter pod:

Published by
Steve Eynon
Organisation
Fantom-Factory Ltd
Pod file size
108.83 kB
Licence
ISC
Built on
17th Feb 2022
Source code
via Git at https://github.com/Fantom-Factory/afButter
Depends on
inet, sys, util, web
Referenced by
afBedNap, afBounce, afEggbox
Javascript Compatible
No

Dependency Graph

  Use mouse to re-position pods

Release History

There have been 21 releases of Butter: