Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What is the command to load a json API? (Which requires to set the content-type header...)


I recommend requiring "request-promise", which is a drop in replacement for "request". Here's the docs on sending custom HTTP headers with that package: https://www.npmjs.com/package/request#custom-http-headers


Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: