Method: OData::Operation#send_odata

Defined in:
lib/odata/operation.rb

#send_odataObject



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/odata/operation.rb', line 122

def send_odata
  @ar.run_callbacks operation_callback_name do
    if Rails.env.development? || Rails.env.test? || Rails.env.staging?
      Rails.logger.debug "SEND_ODATA URL: #{operation_url}"
      Rails.logger.debug "SEND_ODATA METHOD: #{operation_method}"
      Rails.logger.debug "SEND_ODATA BODY: #{operation_body}"
    end
    request = ::Typhoeus::Request.new(
        operation_url,
        method: operation_method,
        body: operation_body,
        headers: operation_headers,
        username: operation_username,
        password: operation_password,
        httpauth: :ntlm
    )
    request.run
  end
end