Requests is ignoring the data provided in the data
parameter as that parameter is used to provide the body of the response (and GET
doesn't have a body). If you are fine with passing query-string arguments - that is:
http://localhost:6543/api/patches?queue_id=12345&patch_id=910
then you can use the params
keyword argument instead:
requests.get(APIURL, params=data)
Otherwise, you can construct your URL using urljoin
from urlparse
in the standard library:
APIURL = "http://localhost:6543/api/patches"
with_queue = urljoin(APIURL, queue_id)
with_patch = urljoin(with_queue, patch_id)
response = requests.get(with_patch)