Developer Forum [ All Topics | New Topic ]

Thread: 'error_code':1001 (invalid format) JSON post python

I am trying to hit the price sheet info endpoint in my terminal (mac)
My code:
import json
import requests
url = 'https://technet.rapaport.com:449/HTTP/JSON/Prices/GetPriceSheetInfo.aspx'
my_data = {"request": {"header": {"username": "my_username", "password": "my_password"}, "body": {}}}
r = requests.post(url, data = json.dumps(my_data))

My response says format error, but I copied my dict directly from the rapaport api. Any ideas?


>> add a comment
Micah
04/07/2016 01:49


2 Replies:

Hi,
I tested this on my computer and couldnt reproduce your problem.
Please provide some more details so I can try helping further.

Yocheved

>> add a comment
Yocheved
4/13/2016 4:16:00 AM
I worked on a python API which did the trick: https://github.com/calpeyser/Rapaport-Python-API.git- still not sure what the original problem was

>> add a comment
Micah
4/15/2016 3:17:00 PM