Project

rackget

0.0
No release in over 3 years
A command line utility that boots a Rack app from config.ru and makes HTTP requests to it directly, without starting a server.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 2.0
 Project Readme

Rackget

Like curl for your Rack application

A command line utility to boot a Rack app and makes a request to it, without starting a server.

Installation

gem install rackget

Usage

# GET request (loads config.ru from current directory)
rackget /users

# Full URL (sets Host header)
rackget http://localhost/users?page=2

# Other HTTP methods
rackget -X POST -d 'name=foo' /users
rackget -X PUT -d '{"name":"bar"}' /users/1
rackget -X DELETE /users/1

# Custom headers
rackget -H 'Content-Type: application/json' -X POST -d '{"name":"foo"}' /users

# Show status and response headers
rackget -i /users

# Specify a rackup file
rackget -r myapp.ru /users

# Pipe request body from stdin
echo '{"name":"foo"}' | rackget -X POST /users

License

MIT