Giter Club home page Giter Club logo

gurl's Introduction

gurl 0.1.0

A go curl-like program to send http request from the command line.

Why Should I Use This Instead of curl or wget?

You should not.

This was a fun project I made to better learn golang.

It has no advantages over curl or wget and several disadvantages.

Installation:

gurl is precompiled for several common platforms and architecturs.

NOTE: installation scripts likely won't work for ARM devices.

Linux/Macos

There is an install script for those on linux or macos.

curl https://raw.githubusercontent.com/BlazingFire007/gurl/main/install-nix.sh | bash

Windows

There is a batch (cmd.exe) script for those on windows.

powershell -Command wget -UseBasicParsing -o install-windows.bat https://raw.githubusercontent.com/BlazingF
ire007/gurl/main/install-windows.bat && call install-windows.bat && del install-windows.bat

Usgae

It's important to put any command line options BEFORE the url.

gurl [options...] url

Please do not use -l, --loop unless you really know what you're doing. -n, --times will not wait for the previous request to complete before sending the next.

Options

  • -A, --user-agent
    • Send User-Agent to server (default "gurl/0.1.0")
  • -H, --headers
    • Set headers: "HEADER1::VAL1|||HEADER2::VAL2"
  • -c, --cookie
    • set cookie from FILE
  • -d, --data
    • HTTP POST data
  • -h, --help
    • Show this screen
  • -i, --include
    • Include protocol response headers in the output
  • -l, --loop
    • Send request until program error. (DO NOT USE: IGNORES ERRORS)
  • -n, --times int
    • Number of times to send the request. Max 10,000. (WARNING: ASYNC) (default 1)
  • -o, --output
    • Write to file instead of stdout
  • -p, --post
    • Send POST request
  • -s, --silent
    • Silent
  • -u, --upload
    • Transfer local FILE to destination
  • -v, --version
    • Display the version of this program

Bugs

Known bugs:

  • downloading a file (with -o, --output) is very unstable and often does not work.
  • urls that start with "http" cannot be prefixed with "http://" or "https://"

Building

You can build for your platform by cloning this repo, and running go build .

You must have 'go' installed to build this tool.

An example of what that looks like on *nix systems:

git clone https://github.com/BlazingFire007/gurl.git
cd gurl
go build .

gurl's People

Contributors

eli-rich avatar

Watchers

 avatar

gurl'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.