title: Sending an jquery AJAX GET request with Python request library
body: <p>I have a website I need to scrape and it is using jquery AJAX function to get information from the server. I have been investigating the code for a while and I successfully get the response from server using:</p>
  
  <pre><code>data = {'part_number':'1234'}
  r = $.ajax({
          type : 'GET',
          url : 'ajaxurl',
          data : data
      })
  </code></pre>
  
  <p>Note that this is done via js console so I am alreadt logged in. When I try to do it in python I need to login first of course:</p>
  
  <pre><code>import requests
  headers = {'User-Agent': 'Mozilla/5.0','Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
  payload = {'username':'me','password':'1234'}
  link = 'login url'
  session = requests.Session()
  resp = session.get(link,headers=headers)
  cookies = requests.utils.cookiejar_from_dict(requests.utils.dict_from_cookiejar(session.cookies))
  resp = session.post(link,headers=headers,data=payload,cookies =cookies)
  
  #until here sucesss!"############
  
  url = "ajaxurl"
  my_params={'part_number':'1234'}
  r = session.get( url = url, data = my_params, cookies =cookies,headers =headers )
  </code></pre>
  
  <p>The post request for login goes well but for the GET response I receive BAD REQUEST 400. I cannot figure out how to format my request. I don't know what ajax does to my request. Anyone has any ideas?</p>
  
  <p>Thanks in Advance! </p>