Skip to content

Dispatch v0.14.0

Compare
Choose a tag to compare
@farmdawgnation farmdawgnation released this 24 Feb 14:41
· 135 commits to main since this release
v0.14.0

The maintainers of and contributors to Dispatch are pleased to announce the final release of Dispatch v0.14.0. This release promotes the 0.14 series to "stable" status. The change log for this release can be viewed in the GitHub commit history. Notable changes are called out below.

Please report any issues you find with this release on the GitHub issues page so that we can fix bugs and release subsequent RCs as needed.

Changes

New Maven Central Coordinates

Since @farmdawgnation took over the project, Dispatch's official website has moved to http://dispatchhttp.org. The twitter handle for news on the project is DispatchHTTP. To align with this new branding, we've changed the Maven Central coordinates as well.

Starting with v0.14.0, Dispatch will be published under org.dispatchhttp instead of net.databinder.dispatch.

AsyncHttpClient 2.1.2.

This bumps our underlying HTTP client to the latest version to fix a handful of bugs. You can view the included changes in this changelog.

(#178) Additional Plain-English Dispatch Verbs

The days where Scala was a language obsessed with DSLs has come and gone. While there sit folks on both sides of the debate about whether or not symbol function names are ultimately good or ultimately bad, it was time for Dispatch to ensure it had plain-english versions of all of its request builder verbs.

To that end, the following new methods have been added to the request building API:

  • appendSegment — Alias to the / verb for adding path segments to a request
  • appendOptionalSegment — Alias to the /? verb for adding an optional segment to a request
  • appendHeaders — Alias to the <:< verb for appending headers to the request
  • appendBodyParams — Alias to the << verb for appending body parameters to the request
  • setStringBody — Alias to the << verb for explicitly setting the body of the request from a String
  • setFileBody — Alias to the <<< verb for explicitly setting the body of the request from a java.io.File
  • appendQueryParams — Alias to the <<? verb for appending query parameters to the request.

(#177) Improve behavior of implied verbs

Dispatch Verbs such as appendBodyParams and setFileBody typically imply an HTTP method (e.g. PUT or POST). Previously, the logic that determined whether or not to change the HTTP method being used only checked to see if the method was currently a GET. If so, using one of those verbs would change which HTTP method your request was using.

Now Dispatch will actually distinguish between implied HTTP method and an HTTP method that was explicitly set by the developer to avoid this issue. If you explicitly say "My request is a GET request" Dispatch should never automatically change that out from under you.

New sbt and scala versions

Hat tip to @xuwei-k for getting us on sbt 1.1.0 and the latest Scala versions.

About Dispatch

Dispatch is an HTTP library for Scala designed to make you more productive while interacting with external services over HTTP from your applications. It's built on the AsyncHttpClient library to provide a fast, flexible abstraction over HTTP interactions.