tram

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2014 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

tram

Tram is a small daemon that will download and cache HTTP GET requests for later use.

Usage

To populate content, make a POST request with a url field containing the url that the HTTP GET request should be made to and one or more alias fields.

$ curl --data "alias=&url=http://ngerakines.me/" http://localhost:3000/

To fetch the content, make an HTTP GET request with the url query string parameter of the url that has been cached.

$ curl http://localhost:3000/?url=http%3A%2F%2Fngerakines.me%2F

This daemon also supports HEAD requests to determine if a file has been cached or not.

$ curl -X HEAD http://localhost:3000/?url=http%3A%2F%2Fngerakines.me%2F

When attempting GET or HEAD requests, a 404 is returned if the file has not been cached.

License

The MIT License (MIT)

Copyright (c) 2014 Nick Gerakines

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
NKG: This is based on the LRU implementation by Google.
NKG: This is based on the LRU implementation by Google.

Jump to

Keyboard shortcuts

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