bat

command
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2022 License: Apache-2.0, Apache-2.0 Imports: 24 Imported by: 0

README

bat

Go implemented CLI cURL-like tool for humans. Bat can be used for testing, debugging, and generally interacting with HTTP servers.

This repository is a fork of astaxie/bat making it available for SCION/QUIC. Refer to the original repository for general usage.

Usage
bat <method> <url>

The scheme defaults to HTTPS -- HTTP is not supported. The method defaults to GET in case there is no data to be sent and to POST otherwise.

URLs can use SCION addresses or hostnames. Hostnames are resolved by scanning the /etc/hosts file or by a RAINS lookup (if configured) -- see the toplevel README.

Examples
Request Explanation
bat server:8080/api/download HTTPS GET request to server:8080/download
bat 17-ffaa:1:10,[10.0.8.100]:8080/api/download HTTPS GET request to 17-ffaa:1:10,[10.0.8.100]:8080/download
bat -b server:8080/api/download Run a benchmark against server:8080/download
bat server:8080/api/upload foo=bar HTTPS POST request with JSON encoded data
to server:8080/upload
bat -f server:8080/api/upload foo=bar HTTPS POST request with URL encoded data
to server:8080/upload
bat -body "Hello World" POST server:8080/api/upload HTTPS POST request with raw data
to server:8080/upload

Documentation

Overview

This file has been modified to make it compatible with SCION

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL