32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
From 42157711deeb323f2f0a2d4956d8f745f5246ff0 Mon Sep 17 00:00:00 2001
|
|
From: Thomas NOEL <tnoel@entrouvert.com>
|
|
Date: Thu, 19 Mar 2015 13:41:11 +0100
|
|
Subject: [PATCH] bdp: x-hedtech headers in response (#6578)
|
|
|
|
---
|
|
passerelle/apps/bdp/models.py | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/passerelle/apps/bdp/models.py b/passerelle/apps/bdp/models.py
|
|
index b103753..66ad8c6 100644
|
|
--- a/passerelle/apps/bdp/models.py
|
|
+++ b/passerelle/apps/bdp/models.py
|
|
@@ -67,8 +67,14 @@ class Bdp(BaseResource):
|
|
data=data, headers=headers, **options)
|
|
result = {
|
|
'status_code': request.status_code,
|
|
+ # from https://github.com/restfulapi/restful-api/blob/master/README.md:
|
|
'x_request_id': request.headers.get('x-request-id'),
|
|
'x_status_reason': request.headers.get('x-status-reason'),
|
|
+ 'x_hedtech_message': request.headers.get('x-hedtech-message'),
|
|
+ 'x_hedtech_totalcount': request.headers.get('x-hedtech-totalcount'),
|
|
+ 'x_hedtech_pageoffset': request.headers.get('x-hedtech-pageoffset'),
|
|
+ 'x_hedtech_pagemaxsize': request.headers.get('x-hedtech-pagemaxsize'),
|
|
+ 'x_hedtech_media_type': request.headers.get('x-hedtech-media-type'),
|
|
}
|
|
try:
|
|
result.update(request.json())
|
|
--
|
|
2.1.4
|
|
|