Skip to content

Commit 94bb6be

Browse files
authored
Add Content-Type for all requests (#50)
1 parent d680c33 commit 94bb6be

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This SDK requires Python 2.7+ or 3.4+. You can install it directly with pip.
2020
2121
pip install amadeus
2222
23-
You can also add it to your `requirements.txt` file and install using:
23+
You can also add it to your `requirements.txt` file and install using:
2424

2525
.. code:: sh
2626
@@ -126,8 +126,7 @@ Or with ``POST`` using ``.client.post`` method:
126126

127127
.. code:: py
128128
129-
amadeus.post('/v1/shopping/flight-offers/pricing', data)
130-
129+
amadeus.post('/v1/shopping/flight-offers/pricing', body)
131130
132131
Response
133132
--------
@@ -215,7 +214,7 @@ List of supported endpoints
215214
# Flight Low-fare Search
216215
amadeus.shopping.flight_offers.get(origin='MAD', destination='NYC', departureDate='2019-08-01')
217216
218-
# Flight Choice Prediction
217+
# Flight Choice Prediction
219218
result = amadeus.shopping.flight_offers.get(origin='MAD', destination='NYC', departureDate='2019-08-01').result
220219
amadeus.shopping.flight_offers.prediction.post(result)
221220

amadeus/client/request.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def __init__(self, options):
7272

7373
self.headers = {
7474
'User-Agent': self.__build_user_agent(),
75-
'Accept': 'application/json, application/vnd.amadeus+json'
75+
'Accept': 'application/json, application/vnd.amadeus+json',
76+
'Content-Type': 'application/vnd.amadeus+json'
7677
}
7778

7879
self.url = self.__build_url()

0 commit comments

Comments
 (0)