GithubHelp home page GithubHelp logo

getsb-cli's Introduction

getsb

Build Status Build status Crates.io

Getsb is a command line tool for sending HTTP request.

Installation

With Cargo

$ cargo install getsb

Manual

You can download prebuilt binaries in the releases section, or create from source.

$ git clone https://github.com/nsheremet/getsb-cli.git
$ cd getsb-cli
$ cargo build --release
Linux
# sudo mv target/release/getsb /usr/local/bin
OSX
# sudo mv target/release/getsb /usr/local/bin/getsb
Windows
  • Create a folder for getsb
  • search for env
  • open "edit your enviroment variables"
  • edit PATH
  • append folder path to the end of the string ie: <path_stuff_here>;C:/getsb/;

How to use Getsb

Basic usage

This is the basic way to use getsb.

GET request example
$ getsb GET https://www.rust-lang.org/ # =>
# Status: 200
#
# Connection: close
# Last-Modified: Thu, 13 Apr 2017 20:18:15 GMT
# Age: 45525
# Server: AmazonS3
# Date: Thu, 13 Apr 2017 20:20:15 GMT
# Content-Type: text/html
# Content-Length: 1456
# X-Cache: Hit from cloudfront
#
# Body here
POST request example
$ getsb POST https://example.com/api/data -b "key=value" -h "Content-Type: application/x-www-form-urlencoded" # =>
# Response
File as request

You can use json files for sending request. This is example request file request.json

{
  "url": "https://example.com/api/data",
  "method": "PUT",
  "headers": [
    "Content-Type: application/json"
  ],
  "body": {
    "key": "value"
  }
}

To send a request using this file:

$ getsb -r request.json # =>
# Response
Save request to file
$ getsb GET http://example.com -f response.dat # =>
# Response saved to file: response.dat

Options

Imgur

Canonical Source

The canonical source of this repo is hosted on GitHub. If you have a GitHub account, please make your issues, and pull requests there.

Copyright and License

(C) Copyright 2017 by Nazarii Sheremet

Getsb is distributed under the terms of both the MPL2.0 license.

See LICENSE for more information.

getsb-cli's People

Contributors

gdwrd avatar

Watchers

 avatar

getsb-cli's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.