fetch 1.1.1

@mislav mislav released this Nov 17, 2016 · 16 commits to master since this release

Android 4.0 compatibility:

  • Fix reading ArrayBuffer into string on older browsers
  • Only define arrayBuffer() if Blob is also supported

Downloads

fetch 2.0.1

@mislav mislav released this Nov 17, 2016 · 4 commits to master since this release

Android 4.0 compatibility:

  • Fix reading ArrayBuffer into string on older browsers
  • Only define arrayBuffer() if Blob is also supported

Downloads

fetch 2.0.0

@mislav mislav released this Nov 14, 2016 · 12 commits to master since this release

This changes the behavior of Headers regarding handling of headers with multiple values. Most notably, it removes the Headers.getAll() method. This diverges from the native implementations of Chrome and Firefox, since those vendors implement an earlier, now outdated version of the spec. The polyfill now acts more similar to Microsoft Edge implementation.

Consider this Headers object:

var h = new Headers()
h.append('accept', 'text/html')
h.append('accept', 'text/plain')
h.append('content-type', 'application/json')

Before:

  • h.get('accept') returned text/html
  • h.getAll('accept') returned an array of values
  • h.forEach (and other iterables) did distinct iterations for each value of the same header

Now:

  • h.get('accept') returns text/html,text/plain
  • h.getAll() is no more
  • h.forEach() (and other iterables) now only do one iteration for each unique header name, regardless of whether it had multiple values

This is in accordance with Section 3.1.2 of the spec, "combine" concept.

Downloads

fetch 1.1.0

@mislav mislav released this Nov 14, 2016 · 16 commits to master since this release

Spec compatibility:

  • 1st argument to Request constructor must be string or Request
  • Always construct a new Request instance in fetch()
  • Always construct a new Headers instance in Response
  • Avoid consuming body when cloning
  • Add support for TypedArray/DataView as POST body
  • ArrayBuffer, TypedArray, and Dataview bodies can now be accessed through any of the arrayBuffer(), text(), or blob() methods
  • Default Response status is 200 OK

Other fixes:

  • Make X-Request-URL header case-insensitive
  • Allow reusing the same GET Request instance multiple times
  • Rework parsing of raw response HTTP headers
  • Attach FileReader event handlers before calling its read* method

Downloads

Fetch 0.11.1

@mislav mislav released this May 5, 2016 · 91 commits to master since this release

  • Reject promise on request timeout
  • Guard against xhr.getAllResponseHeaders() being null

Downloads

Fetch 1.0.0

@dgraham dgraham released this Apr 28, 2016 · 64 commits to master since this release

  • Reject promise on request timeout
  • Add support for URLSearchParams request body
  • Add Headers iterable methods: keys, values, and entries
  • No longer compatible with IE9: IE10+ required

Downloads

Fetch 0.11.0

@mislav mislav released this Jan 19, 2016 · 91 commits to master since this release

  • Make fetch add a Content-Type header based on the type of the body
  • Handle cases where self isn't defined

Downloads

Fetch 0.10.1

@mislav mislav released this Nov 2, 2015 · 112 commits to master since this release

  • Allow making a POST request with an ArrayBuffer body

Downloads

Fetch 0.10.0

@mislav mislav released this Oct 12, 2015 · 119 commits to master since this release

  • Fix handling non-String Headers names and values
  • Request object can now be initialized with another Request as 1st parameter
  • Allow fetch(request, options) invocation style with existing Request object
  • Add request.clone() method
  • Add response.clone() method
  • Add Response.error() method
  • Add Response.redirect(url, status) method

Downloads

fetch 0.9.0

@mislav mislav released this May 29, 2015 · 161 commits to master since this release

  • Invoke forEach callback with value, key, and Headers object.
  • Accept a thisArg forEach parameter.

Downloads