title: Post request payload in python
body: <p>I'm trying to write a python script to get the tracking info from this page: <a href="https://www.purolator.com/en/app-tracker.page" rel="nofollow noreferrer">https://www.purolator.com/en/app-tracker.page</a>. 
  Using F12 in Chrome, I got the header and the request payload, no form data just request payload. The tracking number I'm trying is: GRH000241377</p>
  
  <p>Here's my code:</p>
  
  <pre><code> header = {
          'authority': 'api.purolator.com',
          'method': 'POST',
          'path': '/tracker/puro/json/shipment/search',
          'scheme': 'https',
          'accept': 'application/vnd.puro.shipment.trackingevent+json',
          'accept-encoding': 'gzip, deflate, br',
          'accept-language': 'en-CA',
          'content-length': '90',
          'content-type': 'application/vnd.puro.shipment.trackingevent+json',
          'origin': 'https://www.purolator.com',
          'referer': 'https://www.purolator.com/en/app-tracker.page?pin=GRH000241377&amp;sdate=2019-12-09',
          'sec-fetch-mode': 'cors',
          'sec-fetch-site': 'same-site',
          'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) '
                        'Chrome/79.0.3945.117 Safari/537.36'
      }
  
      data = {
          'pins':'[{"pin":"GRH000241377","sequenceID":1}]',
          'searchOptions':'{"includeReference":true}'
      }
  
  
      url = "https://www.purolator.com/en/app-tracker.page"
      response = requests.post(url, headers=header, json=data)
      res_json = response.json()
  </code></pre>
  
  <p>Response code is 200 but when i print the response.text i get the same page without any result, and if try to get <code>response.json()</code> i got next error, I'm assuming that error is because i have no json in the response</p>
  
  <pre><code>'Error occurred : \n Error Message: Expecting value: line 1 column 1 (char 0)'
  </code></pre>
  
  <p>Presumably error is on data or header construction but can't figure out the problem.
  Any idea?
  Thanks</p>
  
  <p>Here are the response headers:</p>
  
  <pre><code>access-control-allow-origin: https://www.purolator.com
  content-length: 1102
  content-security-policy: default-src 'self' *.hs-cpggpc.ca *.canadapost.ca *.cpggpc.ca *.purolator.com *.epost.ca
  content-type: application/vnd.puro.shipment+json
  date: Tue, 14 Jan 2020 00:37:38 GMT
  status: 200
  strict-transport-security: max-age=86400; preload
  svn-build-number: Purolator.buildLevel.20190622.BF_2019A-B15568.15568
  via: 1.1 199fd61d7551d8868317c5b53cc7d24d.cloudfront.net (CloudFront)
  x-amz-apigw-id: GQ8E3HOV4osFhyQ=
  x-amz-cf-id: Yqyt1uuT9NuucZiYP7arFLAFnTdKbK8yAfRrJ5nfnV7kUyNbhXH0OQ==
  x-amz-cf-pop: IAD89-C3
  x-amzn-remapped-connection: keep-alive
  x-amzn-remapped-content-length: 1102
  x-amzn-remapped-date: Tue, 14 Jan 2020 00:37:38 GMT
  x-amzn-requestid: a04f8174-fc03-49f5-864c-23bb76ff4434
  x-backside-transport: OK OK,OK OK,OK OK,OK OK
  x-cache: Miss from cloudfront
  x-content-type-options: nosniff
  x-frame-options: ALLOW-FROM https://https://www.purolator.com
  x-xss-protection: 1; mode=block
  </code></pre>