parameters: (key, **params)
return_statement: return None
docstring: Send a request to the clusterfuzz api.
  
    Returns a json dict of the response.
docstring_summary: Send a request to the clusterfuzz api.
docstring_tokens: Send a request to the clusterfuzz api .
function: def APIRequest(key, **params):
    """Send a request to the clusterfuzz api.
  
    Returns a json dict of the response.
    """
  
    params["api_key"] = key
    params = urllib.urlencode(params)
  
    headers = {"Content-type": "application/x-www-form-urlencoded"}
  
    try:
      conn = httplib.HTTPSConnection(HOSTNAME)
      conn.request("POST", "/_api/", params, headers)
  
      response = conn.getresponse()
  
      # Never leak "data" into public logs.
      data = response.read()
    except:
      raise Exception("ERROR: Connection problem.")
  
    try:
      return json.loads(data)
    except:
      raise Exception("ERROR: Could not read response. Is your key valid?")
  
    return None
function_tokens: def APIRequest ( key , * * params ) : params [ "api_key" ] = key params = urllib . urlencode ( params ) headers = { "Content-type" : "application/x-www-form-urlencoded" } try : conn = httplib . HTTPSConnection ( HOSTNAME ) conn . request ( "POST" , "/_api/" , params , headers ) response = conn . getresponse ( ) # Never leak "data" into public logs. data = response . read ( ) except : raise Exception ( "ERROR: Connection problem." ) try : return json . loads ( data ) except : raise Exception ( "ERROR: Could not read response. Is your key valid?" ) return None