Socket
Socket
Sign inDemoInstall

request-json

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-json

HTTP client for very simple usages and JSON requests only


Version published
Weekly downloads
3.3K
decreased by-2.3%
Maintainers
1
Weekly downloads
 
Created
Source

About

Request is a great client for NodeJS, but at Cozy we just use a small part of it : simple get, pust, post and delete requests that carry only JSON. This lib aims to simplify Request usage for these situations.

How it works

Client = require("request-json").JsonClient
client = new Client "http://localhost:8888/"

client.post "posts/", { title: "my title", content:"my content" }, \
            (error, response, body) ->
    print response.statusCode

client.get "posts/", (error, response, body) ->
    print body.rows[0].title

client.put "posts/123/", title: "my new title", (error, response, body) ->
    print response.statusCode

client.del "posts/123/", (error, response, body) ->
    print response.statusCode

Keywords

FAQs

Package last updated on 25 Sep 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc