-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You can now restart the gameState with a POST request to 1730 #6
Comments
When I try to post the request, I get a '400 Bad Request' error. I'm 95% sure that my code should work :D |
Try now. |
Still happening. I'm able to post phone scores though, which have roughly the same format, so I'm not sure why that works and this doesn't... |
Sorry about that... Seemed to be working when I tested it in the browser, On Tue, Dec 4, 2012 at 6:17 PM, Daniel Bahr [email protected]:
|
I just successfully retested by sending an ajax call to Is "Bad Request" the exact error text you're getting back? There are a It's a long shot, but are you sending more than just the restartGame On Tue, Dec 4, 2012 at 6:36 PM, Scott Dunham [email protected] wrote:
|
It should be parsing the request and responding with a 204 "No Content" Maybe it's working but your code is seeing no content and responding with On Tue, Dec 4, 2012 at 8:45 PM, sdunham [email protected] wrote:
|
I just double-checked my code and I'm not sure there's anything wrong. I will try a couple things tomorrow when I'm on campus again. |
In anticipation of getting this issue figured out, I want to make one small There are now essentially 2 versions of this call that you can make, and
Let us know if you have any issues with any of this. On Tue, Dec 4, 2012 at 10:47 PM, Daniel Bahr [email protected]:
|
I'm still unable to get either of them working. And now that I'm thinking about it, I'm not even sure that updating phone scores is working, because we haven't been able to test with the phone group. I've spent several hours on this and I still have no idea why it's not working =\ |
Well, that's frustrating... Sorry for all the issues. Could you point me to where in your code you're making the restartGame calls? You could try POSTing phone scores to the simulator, if you want to test out that functionality before your next meeting with the phone group. I'd be very curious to hear if that fails as well. This is probably self-explanatory, but just to make sure we've covered all possible sources of this issue: These calls are different from the standard GET/POST JSON calls, in that they expect URL parameters which we parse on the server side (and don't include any JSON data). The fact that you can successfully POST gameState JSON, but are unable to POST using URL parameters makes me wonder if the required parameters aren't being tacked on to the request URL somehow... |
Got it working. I pushed the changes in the most recent commit to the Game Engine's repo. |
I'll update the API documentation soon, but you can reset the gameState by POSTing in the following manner:
http://puppetmaster.pugetsound.edu:1730/gameState.json?restartGame=true
If you're not the Game Engine, you probably shouldn't be doing this...
The text was updated successfully, but these errors were encountered: