Getting Bad Request: request too large in Python call, but not with same call in Postman.

39 views
Skip to first unread message

Ian Cunningham

unread,
Mar 14, 2017, 9:04:28 AM3/14/17
to Open States
Can anyone point me in the right direction for why I'm getting a "request too large, trying narrowing your search by adding more filters." error when making an OpenStates request in python, but not when making the same call in Postman?

I apologize if this is the wrong place to ask.

Python code:

import requests
import json


state = "mo"

data = {
        "state" : "mo",
        "search_window" : "session",
        "key" : myEmail...@email.com
       }

response = requests.get(url, data = data)
parsed_json = response.json()
print(parsed_json)


Postman call attached

Thanks



OpenStates Postman Call.postman_collection.json

James Turk

unread,
Mar 14, 2017, 9:09:59 AM3/14/17
to Open States
I think you want request.get(url, params=params).

Ian Cunningham

unread,
Mar 14, 2017, 8:17:51 PM3/14/17
to Open States
I am a big dumb idiot, thank you.

Great project, by the way. It's a very informative and powerful API, especially in the current political climate.

Thanks again.
Reply all
Reply to author
Forward
0 new messages