Skip to content

CLI HTTP "client" and a bash HTTP "library" for sending HTTP requests

License

Notifications You must be signed in to change notification settings

vandot/bashclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Bash HTTP Client

CLI HTTP "client" and a bash HTTP "library" for sending HTTP requests.

This is a basic HTTP client. Codes 200, 301 and 302 redirection and all 4XX and 5XX error codes are supported. SSL is not supported. Only text file download is supported.

Requirements

  1. bash, 3 or later

Installation

Git clone or copy paste bashclient.sh

Example usage

You can use bashclient as a library and source it inside your script, or as a CLI tool with arguments.

$ ./bashclient.sh -u http://google.com
$ ./bashclient.sh -s google.com -p /#q=bashclient.sh+github
$ ./bashclient.sh -u http://freegeoip.net/json > response.json

When sourcing inside script call get_http function with URL as a argument or set SERVER and URLPATH variables inside your script. URLPATH must be set with a leading /.

About

CLI HTTP "client" and a bash HTTP "library" for sending HTTP requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages