This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 1ee05252d0ae1d52188e72b705194058d204c123
tree 8eafe96a0b3f38795ab2a94c37b26f1796589354
parent 26dc93ed18b9b1c69d32d41540b593e65733c1a3
tree 8eafe96a0b3f38795ab2a94c37b26f1796589354
parent 26dc93ed18b9b1c69d32d41540b593e65733c1a3
| name | age | message | |
|---|---|---|---|
| |
.autotest | Fri Aug 22 10:56:57 -0700 2008 | |
| |
LICENSE | Fri Aug 22 10:56:57 -0700 2008 | |
| |
README | Thu Oct 16 21:20:09 -0700 2008 | |
| |
Rakefile | Sun Aug 24 06:50:59 -0700 2008 | |
| |
ext/ | Fri Aug 22 10:56:57 -0700 2008 | |
| |
lib/ | Mon Feb 16 21:33:57 -0800 2009 | |
| |
test/ | Mon Feb 16 21:33:57 -0800 2009 |
README
EventMachine based HTTP Request interface. Supports streaming response processing / based on Zed Shaw's Ragel HTTP
parser.
- Borrows a lot of good concepts from Rev's HttpClient, Curb, and other libraries.
- Offers support for single or parallel request queries & via deferred callbacks
Simple client example:
--------
EventMachine.run {
http = EventMachine::HttpRequest.new('http://127.0.0.1/').get :query => {'keyname' => 'value'}
http.callback {
p http.response_header.status
p http.response_header
p http.response
EventMachine.stop
}
}
Multi request example:
----------
EventMachine.run {
multi = EventMachine::MultiRequest.new
# add multiple requests to the multi-handler
multi.add(EventMachine::HttpRequest.new('http://www.google.com/').get)
multi.add(EventMachine::HttpRequest.new('http://www.yahoo.com/').get)
multi.callback {
p multi.responses[:succeeded]
p multi.responses[:failed]
EventMachine.stop
}
}






