File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -92,11 +92,21 @@ def __build_http_request(self):
9292 return HTTPRequest (self .url ,
9393 data = urlencode (self .params ).encode (),
9494 headers = self .headers )
95-
9695 # Adds the authentication header since the bearer token has been set
9796 self .headers ['Authorization' ] = self .bearer_token
9897
98+ list_httpoverride = ['/v2/shopping/flight-offers' ,
99+ '/v1/shopping/seatmaps' ,
100+ '/v1/shopping/availability/flight-availabilities' ,
101+ '/v2/shopping/flight-offers/prediction' ,
102+ '/v1/shopping/flight-offers/pricing' ,
103+ '/v1/shopping/flight-offers/upselling' ]
104+
99105 if self .verb == 'POST' :
106+ if self .path in list_httpoverride :
107+ self .headers ['X-HTTP-Method-Override' ] = 'GET'
108+ return HTTPRequest (self .url , headers = self .headers , method = 'POST' ,
109+ data = self .params .encode ())
100110 if type (self .params ) is dict :
101111 return HTTPRequest (self .url , headers = self .headers , method = 'POST' ,
102112 data = json .dumps (self .params ).encode ())
You can’t perform that action at this time.
0 commit comments