curl-paste

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 12 Imported by: 0

README

Golang powered cURL paste

The HTTP POST request will send the form data along and respond with a link to the paste. The HTTP GET will retrieve the paste with the given ID as plain-text.

Usage

Paste a file named file.txt using cURL.

$ curl -F 'title=Request from cURL' -F 'paste=<file.txt' http://curl-paste.local/

Paste from stdin using cURL.

echo "Hello, world." | curl -F 'title=Request from cURL' -F 'paste=<-' http://curl-paste.local/

A shell function that can be added to .bashrc or .bash_profle for quick pasting from the CLI. The command reads from stdin and outputs the URL of the paste to stdout.

function curl-paste() {
	curl -F 'title=Request from cURL' -F 'paste=<-' https://curl-paste.local
}
echo "hi" | curl-paste

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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