hemanth / nmotw.in

Node Module Of The Week
https://nmotw.in
42 stars 7 forks source link

Fetchival #17

Closed typicode closed 9 years ago

typicode commented 9 years ago

Hi,

fetchival is a small window.fetch wrapper. It's promise-based and you can run the same code in Node and the browser (thanks to other modules).

var fetchival = require('fetchival')
fetchival.fetch = require('node-fetch')

fetchival('/posts')
  .get({ category: 'javascript' })
  .then(function (json) {
    console.log(json)
  })

https://github.com/typicode/fetchival

hemanth commented 9 years ago

Nice module @typicode but something similar was already covered. isomorphic-fetch, I did notice that fetchival makes it bit more easier when compared to the native fetch.

typicode commented 9 years ago

Thanks for the comment, no worries. Didn't know about isomorphic-fetch, great project :) Yes, this is the idea making it easier and more concise to write requests using fetch. Closing the issue.

hemanth commented 9 years ago

:+1: