Class: Common::Client::Middleware::Request::SOAPHeaders

Inherits:
Faraday::Middleware
  • Object
show all
Defined in:
lib/common/client/middleware/request/soap_headers.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
# File 'lib/common/client/middleware/request/soap_headers.rb', line 8

def call(env)
  env.request_headers['Date'] = Time.now.utc.strftime('%a, %d %b %Y %H:%M:%S GMT')
  env.request_headers['Content-Length'] = env.body.bytesize.to_s
  @app.call(env)
end