jasiek / patron Goto Github PK
View Code? Open in Web Editor NEWThis project forked from toland/patron
Ruby HTTP client based on libcurl
Home Page: http://toland.github.com/patron/
License: MIT License
This project forked from toland/patron
Ruby HTTP client based on libcurl
Home Page: http://toland.github.com/patron/
License: MIT License
= Ruby HTTP Client == SYNOPSIS Patron is a Ruby HTTP client library based on libcurl. It does not try to expose the full "power" (read complexity) of libcurl but instead tries to provide a sane API while taking advantage of libcurl under the hood. == USAGE Usage is very simple. First, you instantiate a Session object. You can set a few default options on the Session instance that will be used by all subsequent requests: sess = Patron::Session.new sess.timeout = 10 sess.base_url = "http://myserver.com:9900" sess.headers['User-Agent'] = 'myapp/1.0' The Session is used to make HTTP requests. resp = sess.get("/foo/bar") Requests return a Response object: if resp.status < 400 puts resp.body end The GET, HEAD, PUT, POST and DELETE operations are all supported. sess.put("/foo/baz", "some data") sess.delete("/foo/baz") You can ship custom headers with a single request: sess.post("/foo/stuff", "some data", {"Content-Type" => "text/plain"}) That is pretty much all there is to it. == REQUIREMENTS You need a recent version of libcurl in order to install this gem. On MacOS X the provided libcurl is sufficient. You will have to install the libcurl development packages on Debian or Ubuntu. Other Linux systems are probably similar. Windows users are on your own. Good luck with that. == INSTALL sudo gem install patron Copyright (c) 2008 The Hive
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.