Class: Safrano::Batch::EnabledHandler
- Inherits:
-
HandlerBase
- Object
- HandlerBase
- Safrano::Batch::EnabledHandler
- Defined in:
- lib/odata/batch.rb
Overview
$batch enabled Handler
Constant Summary
Constants inherited from HandlerBase
Instance Attribute Summary collapse
-
#body_str ⇒ Object
Returns the value of attribute body_str.
-
#boundary ⇒ Object
Returns the value of attribute boundary.
-
#mmboundary ⇒ Object
Returns the value of attribute mmboundary.
-
#parts ⇒ Object
Returns the value of attribute parts.
-
#request ⇒ Object
Returns the value of attribute request.
Instance Method Summary collapse
- #odata_get(_req) ⇒ Object
-
#odata_post(req) ⇒ Object
here we are in the Batch handler object, and this POST should normally handle a $batch request.
Methods inherited from HandlerBase
#allowed_transitions, #transition_end
Methods included from Transitions::GetNextTrans::ForJustTransitionEnd
Instance Attribute Details
#body_str ⇒ Object
Returns the value of attribute body_str.
133 134 135 |
# File 'lib/odata/batch.rb', line 133 def body_str @body_str end |
#boundary ⇒ Object
Returns the value of attribute boundary.
131 132 133 |
# File 'lib/odata/batch.rb', line 131 def boundary @boundary end |
#mmboundary ⇒ Object
Returns the value of attribute mmboundary.
132 133 134 |
# File 'lib/odata/batch.rb', line 132 def mmboundary @mmboundary end |
#parts ⇒ Object
Returns the value of attribute parts.
134 135 136 |
# File 'lib/odata/batch.rb', line 134 def parts @parts end |
#request ⇒ Object
Returns the value of attribute request.
135 136 137 |
# File 'lib/odata/batch.rb', line 135 def request @request end |
Instance Method Details
#odata_get(_req) ⇒ Object
155 156 157 |
# File 'lib/odata/batch.rb', line 155 def odata_get(_req) [405, EMPTY_HASH, 'You cant GET $batch, POST it '] end |
#odata_post(req) ⇒ Object
here we are in the Batch handler object, and this POST should normally handle a $batch request
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/odata/batch.rb', line 139 def odata_post(req) @request = req if @request.media_type == Safrano::MP_MIXED @mult_request = @request.parse_multipart @mult_request.prepare_content_id_refs @mult_request.get_mult_resp(@request) else [415, EMPTY_HASH, 'Unsupported Media Type'] end end |