Skip to content

Commit

Permalink
Add Content-Type for all requests (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyroux authored Nov 7, 2019
1 parent d680c33 commit 94bb6be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This SDK requires Python 2.7+ or 3.4+. You can install it directly with pip.
pip install amadeus
You can also add it to your `requirements.txt` file and install using:
You can also add it to your `requirements.txt` file and install using:

.. code:: sh
Expand Down Expand Up @@ -126,8 +126,7 @@ Or with ``POST`` using ``.client.post`` method:

.. code:: py
amadeus.post('/v1/shopping/flight-offers/pricing', data)
amadeus.post('/v1/shopping/flight-offers/pricing', body)
Response
--------
Expand Down Expand Up @@ -215,7 +214,7 @@ List of supported endpoints
# Flight Low-fare Search
amadeus.shopping.flight_offers.get(origin='MAD', destination='NYC', departureDate='2019-08-01')
# Flight Choice Prediction
# Flight Choice Prediction
result = amadeus.shopping.flight_offers.get(origin='MAD', destination='NYC', departureDate='2019-08-01').result
amadeus.shopping.flight_offers.prediction.post(result)
Expand Down
3 changes: 2 additions & 1 deletion amadeus/client/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def __init__(self, options):

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

self.url = self.__build_url()
Expand Down

0 comments on commit 94bb6be

Please sign in to comment.