class Restforce::DB::Middleware::StoreRequestBody

Public: A Faraday middleware to store the request body in the environment.

This works around an issue with Faraday where the request body is squashed by the response body, once a request has been made.

See also:

Public Instance Methods

call(request_env) click to toggle source

Public: Executes this middleware.

request_env - The request's Env from Faraday.

# File lib/restforce/db/middleware/store_request_body.rb, line 20
def call(request_env)
  request_env[:request_body] = request_env[:body]
  @app.call(request_env)
end