ButterRelease Notes



  • Chg: Updated to be compatible with Fantom 1.0.77 AND retain compatibility with older versions. (The new crypto pod broke TLS / HTTPS backwards compatibility.)


  • Chg: Cookies values in HttpRequestHeaders are no longer quoted when set (web::Cookie doesn't handle the case very well which can break Bounce tests).


  • Chg: Re-jigged ButterResponse ctors (mainly for Bounce).
  • Chg: Moar lenient HttpResponseHeaders, to be more accepting of what the Internet throws at you.
  • Chg: ButterResponse now checks that a HTTP response was actualy given before deciphering it.
  • Chg: ButterResponse handles dodgy responses with no status message.
  • Chg: FollowRedirectsMiddleware is adaptive to previous failed redirects with respect to URL encoding.


  • New: Added to HttpResponseHeaders:
    • contentSecurityPolicy
    • contentSecurityPolicyReportOnly
    • referrerPolicy
    • strictTransportSecurity
    • xContentTypeOptions
  • Chg: More lenient HTTP request header parsing.
  • Chg: Converted HttpRequestHeaders.origin from a Str to a URI. (Potential breaking change.)
  • Bug: Cookies with a max-age of 0sec are never re-sent.


  • Chg: Deprecated XXXHeaders.map in favour of val.
  • Bug: The main ButterResponse ctor didn't recognise a given Buf and set the body to null.
  • Bug: Fixed rare NPE in GzipMiddleware.


  • New: BasicAuthMiddleware that converts URL user info to a BASIC authentication header.
  • New: Added HttpResponseHeaders.wwwAuthenticate & HttpRequestHeaders.authorization.
  • New: Redirect requests and responses are logged to DEBUG.
  • Chg: Refactored ButterResponse ctors. (Potential Breaking Change.)
  • Chg: Request and Response dumps now optionally render the body.
  • Bug: Re-setting the Body.str didn't clear out original value.
  • Bug: Redirects for relative URLs didn't always work.


  • Chg: ButterResponse.dump() de-gzips body before dumping.
  • Chg: Body.in() is no longer deprecated.
  • Chg: Body JSON / form methods return null on an empty response, not throw ParseErr.
  • Bug: Multipart forms weren't being rendered correctly.


  • New: Multipart form support - see ButterRequest.writeMultipartForm().
  • New: Added Butter.postJson(), Butter.putJson(), and Body.json.
  • New: dump() methods for ButterRequest and ButterResponse.
  • New: Requests and responses are logged to DEBUG.
  • Chg: Updated to work with Fantom 1.0.68.
  • Chg: FollowRedirectsMiddleware resolves partial redirect URIs against the request URL.
  • Chg: QualityValues now understands * wildcards.
  • Bug: Responses didn't set the Str charset on the body.buf.
  • Bug: Autoset request Content-Length should there be a Content-Type.



  • Chg: Finally nailed the nullability of the properties of Body.
  • Bug: Body methods could overwrite previously set header MimeTypes.


  • New: setHeader() and setMethod() builder methods on ButterRequest.
  • Chg: Butter.middleware() list is now modifiable.
  • Bug: FollowRedirectsMiddleware now re-sets the host header.


  • New: StickyHeaders getters and setters.
  • Chg: Body fields now handle null values.
  • Chg: Request headers are not set when Body content is set to null.
  • Bug: The Buf in Body is now reset to the beginning when used in a response.


  • New: Body.form field for getting / setting URL encoded forms.
  • New: ButterResponse.makeFromBuf() ctor for Bounce.
  • Chg: Better gzip management in GzipMiddleware.


  • New: ProxyMiddleware re-uses the proxy mechanism used by web::WebClient.
  • New: Added more REST methods to Butter.
  • Chg: ButterRequest and ButterResponse now share a common Body object. (Breaking change)
  • Chg: BadStatusErr displays more request / response details.



  • Chg: Added ButterRequest.setBodyFromStr() and ButterRequest.setBodyFromJson().
  • Chg: Added ButterResponse.asJson() and ButterResponse.asJsonMap().
  • Bug: HttpTerminator sets Content-Length header for GET requests with a non-empty body.
  • Bug: GzipMiddleware updated to work with Fantom-1.0.67.



  • New: Added getCookie() and removeCookie() to StickyCookiesMiddleware.
  • Chg: HttpRequestHeaders.host is now a Str.


  • New: Added GzipMiddleware.
  • Chg: Renamed ButterRequest.uri -> ButterRequest.url.
  • Chg: Request header Host is normalised.



  • New: ErrOn5xxMiddleware detects and re-throws any Errs processed by BedSheet.
  • Chg: Rejigged the default middleware stack so Cookies can be captured in re-direct responses.


  • Chg: Added support for HTTP 1.1 308 Redirects.


  • New: Added ErrOn4xxMiddleware to cacth those annoying 404s!
  • Chg: Support for HTTP resposne headers that may appear multiple times, e.g. Set-Cookie
  • Chg: Renamed ButterRequest.data() -> stash().
  • Bug: Could not post case-insensitive forms - see Uri.encodeQuery throws UnsupportedOperationException


  • New: Preview Release