<< Back to Programming Forum   Search

Posts 1 - 4 of 4   
Err: "Failed to read auth" (Create game API): 7/15/2015 06:37:21


knyte 
Level 58
Report
Nvm figured it out.

If you're using the Python requests library, the Warlight parser's only going to properly understand your parameters if you pass the dictionary in as JSON instead. Otherwise it will either say that there was nothing to read or have trouble recognizing your authentication. The downside is that you can't use r.url anymore to look at the formatted URL string, like you could if you passed in the dictionary the way you're supposed to. So, it's just like a regular post request, except... like this:

 

    import requests
    ....
    data = dict()
    ....
    r = requests.post(url=..., json=data)



Edited 7/19/2015 17:58:56
Err: "Failed to read auth" (Create game API): 7/15/2015 17:40:25


Benjamin628 
Level 59
Report
2 threads in a row with the first post "Nvm I figured it out" :P
Err: "Failed to read auth" (Create game API): 7/19/2015 12:45:55


ps 
Level 60
Report
atleast leave the original question and type the resolution you found. might be useful tips for other folks messing around with the API.
Err: "Failed to read auth" (Create game API): 7/19/2015 17:43:15


knyte 
Level 58
Report
Alright.
Posts 1 - 4 of 4