Permalink
Commits on Dec 29, 2016
  1. Remove secrets

    josh committed Dec 29, 2016
Commits on Dec 6, 2016
  1. Merge pull request #449 from woudini/tolerance-provision

    Support Tolerance Provision when parsing headers
    mislav committed on GitHub Dec 6, 2016
  2. Support Tolerance Provision when parsing headers

    woudini committed Dec 6, 2016
Commits on Nov 21, 2016
  1. Add test for cloning GET request

    Closes #440
    mislav committed Nov 21, 2016
Commits on Nov 17, 2016
  1. fetch 2.0.1

    mislav committed Nov 17, 2016
  2. Only define `arrayBuffer()` if Blob is also supported

    It turns out that Android 4.0 implements ArrayBuffer but no Blob.
    
    This restores the behavior that v1.0 had, but which regressed in v1.1.0.
    mislav committed Nov 17, 2016
Commits on Nov 15, 2016
  1. Display uncaught errors on the test results page

    This makes debugging in devices without a developer console easier.
    mislav committed Nov 15, 2016
  2. Fix reading ArrayBuffer into string on older browsers

    Android 4.0 doesn't like the `String.fromCharCode.apply` hack.
    mislav committed Nov 15, 2016
  3. Avoid using `native` keyword as variable

    Fixes the test suite in some older browsers that choke on it.
    mislav committed Nov 15, 2016
  4. Mirror PhantomJS download by using Travis' own infrastructure

    This is to avoid hitting Bitbucket rate limits for downloads.
    mislav committed Nov 15, 2016
  5. Merge pull request #432 from Rosuav/patch-1

    Fix misspelling of [ae]ffect
    mislav committed on GitHub Nov 15, 2016
  6. Fix misspelling of [ae]ffect

    Rosuav committed on GitHub Nov 15, 2016
Commits on Nov 14, 2016
  1. fetch 2.0.0

    mislav committed Nov 14, 2016
  2. Merge pull request #429 from mislav/headers-spec-compat

    Change Headers multiple value handling for spec compatibility
    mislav committed on GitHub Nov 14, 2016
  3. fetch 1.1.0

    mislav committed Nov 14, 2016
  4. Attach FileReader event handlers before calling its `read*` method

    Avoids a potential race condition when the load event already fired
    before a handler was attached. This was reported happening in Safari.
    
    Fixes #353
    mislav committed Nov 14, 2016
  5. Merge branch 'array-buffer'

    mislav committed Nov 14, 2016
  6. Shorten body extraction tests

    mislav committed Nov 14, 2016
  7. ArrayBuffer can now be consumed through `blob()`/`text()`

    Before, when a Request or Response was initialized with an ArrayBuffer
    or TypedArray, that data was only accessible through `arrayBuffer()`
    method, and if it was initialized with DataView, it wasn't accessible at
    all.
    
    Now, regardless of the original type of body, the accessors `blob()`,
    `arrayBuffer()`, and `text()` always work.
    mislav committed Nov 14, 2016
  8. Remove duplicate test

    mislav committed Nov 14, 2016
  9. Simplify ArrayBuffer tests

    mislav committed Nov 14, 2016
Commits on Nov 12, 2016
  1. Define `npm test` script

    mislav committed Nov 12, 2016
  2. Default Response status is 200 OK

    This is in accordance with Section 6.4 of the spec:
    
        dictionary ResponseInit {
          unsigned short status = 200;
          ByteString statusText = "OK";
          HeadersInit headers;
        };
    
    Fixes #376
    mislav committed Nov 12, 2016
  3. Merge pull request #430 from mislav/array-buffer-view

    Support ArrayBufferView types as POST body
    mislav committed on GitHub Nov 12, 2016
Commits on Nov 11, 2016
  1. Support ArrayBuffer in BodyInit

    Fixes #350.
    tamird committed Jun 14, 2016
  2. Test against PhantomJS 2.1.1 on Travis

    This will get all the ArrayBuffer & Blob tests passing.
    mislav committed Nov 11, 2016
  3. Ensure that Blob is supported in case of DataView

    PhantomJS 1.9.8 seems to support ArrayBuffer & DataView, but not Blob.
    mislav committed Nov 11, 2016
  4. Add support for DataView as POST body

    DataView is one of the possible views for ArrayBuffer, which the fetch
    spec says should be supported. However, IE 10-11 don't handle it well
    when passed unmodified to XMLHttpRequest. As a workaround, wrap every
    DataView in a Blob.
    
    It's interesting to note that IE 10's string representation of a
    DataView instance is `[object Object]` rather than `[object DataView]`.
    Therefore, the only way to detect it is via `isPrototypeOf`.
    mislav committed Nov 11, 2016
  5. Add support for ArrayBufferView as POST body

    Section 6.2 of the spec says that body can be BufferSource.
    BufferSource is defined in https://heycam.github.io/webidl/#BufferSource:
    
    > The BufferSource typedef is used to represent objects that are either
    > themselves an ArrayBuffer or which provide a view on to an ArrayBuffer.
    
    Furthermore, passing an ArrayBuffer directly to XMLHttpRequest is
    considered deprecated and Safari throws a warning about it. This makes
    it even more important to support ArrayBufferView in fetch.
    
    The fallback for `ArrayBuffer.isView` is provided for IE 10, which
    doesn't implement the method.
    mislav committed Nov 11, 2016
  6. Merge pull request #428 from mislav/spec-compat

    Spec compatibility for Request/Response constructors and cloning
    mislav committed on GitHub Nov 11, 2016
Commits on Nov 10, 2016
  1. Change Headers multiple value handling for spec compatibility

    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
      headers name, regardless of multiple values
    
    This is in accordance with Section 3.1.2 of the spec, "combine" concept.
    
    The updated tests currently break in Chrome and Firefox when exercising
    the native implementation because their implementation is outdated. The
    implementation in Edge is more correct, but the tests still fail there
    because its implementation combines values with `, ` (notice the space)
    rather than `,`.
    mislav committed Nov 10, 2016