Can't seem to find the issue with the requestID parameter for the request header

时间:2019-04-08 13:07:08

标签: python-3.x rest python-requests json-rpc

I am trying to pull data from a REST API that uses a "similar standard to JSON RPC". The params I am passing look right according to the documentation here and here. The error I am receiving is ...message:"Header missing request ID".... I am unsure what I am missing that would properly declare the requestID.

I have looked at the documentation provided via the API I am trying to pull data from but it's not very helpful considering it's all in PHP and cURL. I am trying to complete this task using python-requests.

getParams = {'method': 'getCustomers', 'params':{'where':'', 'limit': 2}, 'id': 'getCustomers'}

Result:

{"result":null,"error":{"code":102,"message":"Header missing request ID","data":[]},"id":null}

The return result should contain a list of All Customers and their attributes in JSON format.

1 个答案:

答案 0 :(得分:0)

结果证明我使用的代码没有错。我尝试调用的API出现问题。