Butter 1.2.4
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 (102.75 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.4 - 1.2"]

Documentation

Information

Meta information on the Butter pod:

Published by
Steve Eynon
Organisation
Alien-Factory
Pod file size
102.75 kB
Licence
ISC Licence (ISC)
Built on
22nd Jan 2017
Source code
via Mercurial at https://bitbucket.org/AlienFactory/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 16 releases of Butter: