title: Google Cloud Functions is not returning response
body: <p>I am using this api on Google cloud functions <code>https://ocr.space/ocrapi</code>
  This is the function I have deployed <br></p>
  
  <pre><code>def ocr_space_url(request):
      request_json = request.get_json()
      request_args = request.args
  
  
      if request_json and 'url' in request_json:
          url = request_json['url']
  
      elif request_args and 'url' in request_args: 
          url = request_args['url']
      else:
          url = 'http://www.africau.edu/images/default/sample.pdf'
  
      headers = {
          'apikey': 'helloworld',
      }
       payload = {'url': url,
                 }
      r = requests.post('https://api.ocr.space/parse/image',
                        headers=headers, data=payload,
                        )
  
      return r.content.decode()
  </code></pre>
  
  <p><br>Deployed like this:<br> <code>gcloud functions deploy ocr_space_url --runtime python37 --trigger-http</code>
  <br>
  <br>Calling it by:<br><code>curl -X POST "https://us-central1-prefab-environs-241910.cloudfunctions.net/ocr_space_url" -H "Content-Type:application/json" -d "{"url": "http://dl.a9t9.com/ocrbenchmark/pdfscan.pdf"}"</code><br>
  <br> when I call it with content type it gives me below error<br></p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"&gt;
  &lt;title&gt;400 Bad Request&lt;/title&gt;
  &lt;h1&gt;Bad Request&lt;/h1&gt;
  &lt;p&gt;The browser (or proxy) sent a request that this server could not understand.&lt;/p&gt;
  </code></pre>
  
  <p><br> if I call it without content type, it goes into the else, because i get <code>request_json = None</code> and for the url in else it give me proper result<br>
  <br>
  I am using cloud functions for the first time in my life please help</p>