Method: EventMachine::Protocols::HttpClient2#post
- Defined in:
- lib/ext/eventmachine-0.12.10/lib/em/protocols/httpclient2.rb
#post(args) ⇒ Object
Post to a url
req = conn.post('/data')
req.callback{|response| puts response.content }
– XXX there’s no way to supply a POST body.. wtf?
274 275 276 277 278 279 280 |
# File 'lib/ext/eventmachine-0.12.10/lib/em/protocols/httpclient2.rb', line 274 def post args if args.is_a?(String) args = {:uri=>args} end args[:verb] = "POST" request args end |