Xr

Languages and libraries

javascript library

SHOW HN2015

32points
22comments
#870of 2,565 in 2015
Top 34%of 2015 by points

How HN took it

RoastedHalf or more of the comments are critical

0 positive, 4 neutral or asking, 0 mixed, 7 critical, out of 11 comments about the project. Thread score -0.43.

Execution: 0 for, 3 againstDesign: 0 for, 2 againstIdea: 0 for, 1 againstDocs: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Nice tiny dependency that makes AJAX requests nicer

    From 1 comment
    • Yep, had a play around with fetch but it didn't seem ready and acted kind of weird. Can't remember exactly what was wrong as it was a while ago. I imagine once fetch is decent,…
      antihero on HN
  • Looks awesome

    From 1 comment
    • Looks awesome, though the name fetch does work better for GET requests than for POST/PUT/PATCH/DELETE.
      VeejayRampay on HN

Objections

  • Rejects on any non-200 status, though 2xx codes like 201, 202 and 204 are success

    From 2 comments
    • > * Rejects if not 200. There are other valid 20x return codes that indicate success, such as 202 Accepted and 204 No Content.
      pimlottc on HN
    • Isn't 201 the code for a successful resource creation as well?
      VeejayRampay on HN
  • Giant options object API is hard to compose

    From 1 comment
    • Really sad they choose "giant options object" for the api. Makes it pretty difficult to compose.
      Touche on HN
  • Name fetch fits GET better than other methods

    From 1 comment
    • Looks awesome, though the name fetch does work better for GET requests than for POST/PUT/PATCH/DELETE.
      VeejayRampay on HN

Requests

  • Accept all 2xx status codes instead of only 200

    From 1 comment
    • > * Rejects if not 200. There are other valid 20x return codes that indicate success, such as 202 Accepted and 204 No Content.
      pimlottc on HN
  • Reject when the loader throws, such as on malformed JSON

    From 1 comment
    • Pretty cool, but I have a nitpick: reject() should be called when the loader throws an exception (e.g. if the response is malformed JSON).
      breuleux on HN

Questions

  • Should the library use fetch instead

    From 1 comment
    • You should look at `fetch` which is the new specification for a promise based XHR wrapper. Polyfill: https://github.com/github/fetch To use Fetch in Firefox (38), you'll…
      vjeux on HN
  • Does the XHR get garbage collected after .then

    From 1 comment
    • What happens after .then? Does xhr get GC'd? Would the inner xhr be considered out of scope?
      rayshan on HN

Alternatives named

  • fetch API with github polyfill

    From 1 comment
    • You should look at `fetch` which is the new specification for a promise based XHR wrapper. Polyfill: https://github.com/github/fetch To use Fetch in Firefox (38), you'll…
      vjeux on HN
  • axios

    From 1 comment

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/9133067)