class Safrano::Batch::EnabledHandler
battre le tout
Attributes
body_str[RW]
boundary[RW]
mmboundary[RW]
parts[RW]
request[RW]
Public Class Methods
new()
click to toggle source
# File lib/odata/batch.rb, line 124 def initialize; end
Public Instance Methods
odata_get(_req)
click to toggle source
# File lib/odata/batch.rb, line 147 def odata_get(_req) [405, EMPTY_HASH, 'You cant GET $batch, POST it '] end
odata_post(req)
click to toggle source
here we are in the Batch
handler object, and this POST should normally handle a $batch request
# File lib/odata/batch.rb, line 128 def odata_post(req) @request = req if @request.media_type == Safrano::MP_MIXED batcha = @request.create_batch_app @mult_request = @request.parse_multipart @mult_request.prepare_content_id_refs @mult_response = Safrano::Response.new resp_hdrs, @mult_response.body = @mult_request.get_http_resp(batcha) [202, resp_hdrs, @mult_response.body[0]] else [415, EMPTY_HASH, 'Unsupported Media Type'] end end