Class: Rapidomize::Transports::CommonHTTP
- Inherits:
-
BaseTransport
- Object
- BaseTransport
- Rapidomize::Transports::CommonHTTP
- Defined in:
- lib/rapidomize/transport/http_transport.rb
Overview
CommonHTTP transport is used to send payloads via HTTP protocol It is called common http, since it does not maintain a persistent connection with a server. For CommonHTTP to send data, messages must provide a valid URI of the HTTP endpoint.
Instance Method Summary collapse
-
#deliver(message) ⇒ Net::HTTPResponse
Deliver a message to the URI of the message.
Methods inherited from BaseTransport
Instance Method Details
#deliver(message) ⇒ Net::HTTPResponse
Deliver a message to the URI of the message
14 15 16 17 18 19 |
# File 'lib/rapidomize/transport/http_transport.rb', line 14 def deliver() # TODO: Add support for other HTTP verbs too. (i.e PUT, GET, UPDATE) Net::HTTP.post .uri, .payload.to_json, { 'Content-Type' => 'application/json' } end |