Module: DecisionAgent::Web::RackRequestHelpers
- Included in:
- Server
- Defined in:
- lib/decision_agent/web/rack_request_helpers.rb
Defined Under Namespace
Classes: RequestContext
Class Method Summary collapse
-
.read_body(env) ⇒ Object
Helper to read request body as string.
Class Method Details
.read_body(env) ⇒ Object
Helper to read request body as string
186 187 188 189 190 191 192 193 |
# File 'lib/decision_agent/web/rack_request_helpers.rb', line 186 def self.read_body(env) input = env["rack.input"] return "" unless input body = input.read input.rewind body.to_s end |