New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

restme

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restme

A node.js cli to make http requests easy.

  • 1.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

restme

Restme is an easy way to execute requests in terminal. Instead of use the classic curl, why don't use a simpler cli?

Version

1.0.9

Installation

$ [sudo] npm i -g restme

Try it now! (with chuck norris API :P)

$ restme http://api.icndb.com/jokes/random

alt text

Awesome uh?

Simple example

$ restme https://someurl.com

Simple example, without protocol (default is http://)

$ restme someurl.com

Using convenience -j or --json option to auto include Accept: application/json

$ restme https://someurl.com/post/1 -j

Raw mode! If you don't want pretty json responses

$ restme https://someurl.com -r [or --raw]

Use other request method (default is GET)

$ restme DELETE https://someurl.com/post/1

Adding some headers

$ restme https://someurl.com/post/1 -H "Accept: application/json, X-Token: XXXXXXXXXX" [or --header]

Posting serialized data

$ restme POST https://someurl.com/post/1 -f "name=foo&password=bar"[or --form]

Posting JSON data

$ restme POST https://someurl.com/post/1 -d '{"name":"foo", "password": "bar" }'[or --data]

Using basic auth

$ restme https://someurl.com/auth -a user@password [or --auth]

Only returns the headers (curl -I equivalent)

$ restme https://www.someurl.com -I

Only returns the body

$ restme https://www.someurl.com -B

Akamai debug mode!

$ restme https://www.someurl.com --akamai

Timeout to requests

$ restme https://www.someurl.com -m 2 [or --max-time]

Putting all together

$ restme https://someurl.com.br -j -H "X-Token: XXXXXXXXX" -r -a user@password

Still want to help?

$ restme -h [--help]

Todo's

  • Write Tests (shame on me)
  • Add more and more helpful options
  • Add Code Comments
  • Write the code in ES6 (?)
  • Plz, suggests

License

MIT

Keywords

FAQs

Package last updated on 30 Jul 2015

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