Revision 8299ef23
b/snf-astakos-app/astakos/api/quotas.py | ||
---|---|---|
116 | 116 |
@api.api_method(http_method='POST', token_required=True, user_required=False) |
117 | 117 |
@component_from_token |
118 | 118 |
def issue_commission(request): |
119 |
data = request.body
|
|
119 |
data = request.raw_post_data
|
|
120 | 120 |
try: |
121 | 121 |
input_data = json.loads(data) |
122 | 122 |
except json.JSONDecodeError: |
... | ... | |
207 | 207 |
@component_from_token |
208 | 208 |
@commit_on_success_strict() |
209 | 209 |
def resolve_pending_commissions(request): |
210 |
data = request.body
|
|
210 |
data = request.raw_post_data
|
|
211 | 211 |
try: |
212 | 212 |
input_data = json.loads(data) |
213 | 213 |
except json.JSONDecodeError: |
... | ... | |
263 | 263 |
@component_from_token |
264 | 264 |
@commit_on_success_strict() |
265 | 265 |
def serial_action(request, serial): |
266 |
data = request.body
|
|
266 |
data = request.raw_post_data
|
|
267 | 267 |
try: |
268 | 268 |
input_data = json.loads(data) |
269 | 269 |
except json.JSONDecodeError: |
b/snf-astakos-app/astakos/api/util.py | ||
---|---|---|
165 | 165 |
# Error Response Codes: BadRequest (400) |
166 | 166 |
|
167 | 167 |
try: |
168 |
input_data = json.loads(request.body)
|
|
168 |
input_data = json.loads(request.raw_post_data)
|
|
169 | 169 |
except: |
170 | 170 |
raise faults.BadRequest('Request body should be json formatted.') |
171 | 171 |
else: |
b/snf-cyclades-app/synnefo/plankton/views.py | ||
---|---|---|
153 | 153 |
with image_backend(request.user_uniq) as backend: |
154 | 154 |
image = backend.register(name, location, params) |
155 | 155 |
else: |
156 |
#f = StringIO(request.body)
|
|
156 |
#f = StringIO(request.raw_post_data)
|
|
157 | 157 |
#image = backend.put(name, f, params) |
158 | 158 |
return HttpResponse(status=501) # Not Implemented |
159 | 159 |
|
... | ... | |
384 | 384 |
log.debug('update_image_members %s', image_id) |
385 | 385 |
members = [] |
386 | 386 |
try: |
387 |
data = json.loads(request.body)
|
|
387 |
data = json.loads(request.raw_post_data)
|
|
388 | 388 |
for member in data['memberships']: |
389 | 389 |
members.append(member['member_id']) |
390 | 390 |
except (ValueError, KeyError, TypeError): |
b/snf-cyclades-app/synnefo/userdata/rest.py | ||
---|---|---|
91 | 91 |
self.request = request |
92 | 92 |
self.args = args |
93 | 93 |
self.kwargs = kwargs |
94 |
data = request.body
|
|
94 |
data = request.raw_post_data
|
|
95 | 95 |
|
96 | 96 |
if request.method.upper() in ['POST', 'PUT']: |
97 | 97 |
# Expect json data |
b/snf-django-lib/snf_django/lib/api/proxy/__init__.py | ||
---|---|---|
81 | 81 |
headers.pop(k, None) |
82 | 82 |
|
83 | 83 |
kwargs['headers'] = headers |
84 |
kwargs['body'] = request.body
|
|
84 |
kwargs['body'] = request.raw_post_data
|
|
85 | 85 |
|
86 | 86 |
path = request.path.lstrip('/') |
87 | 87 |
if path.startswith(proxy_base): |
b/snf-django-lib/snf_django/lib/api/utils.py | ||
---|---|---|
94 | 94 |
Only JSON format is supported |
95 | 95 |
|
96 | 96 |
""" |
97 |
data = request.body
|
|
97 |
data = request.raw_post_data
|
|
98 | 98 |
content_type = request.META.get("CONTENT_TYPE") |
99 | 99 |
if content_type is None: |
100 | 100 |
raise faults.BadRequest("Missing Content-Type header field") |
Also available in: Unified diff