Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to test post comment with the following URL

Request Headers

Accept: */*
Content-Type: application/x-www-form-urlencoded; charset=UTF-8 
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8

I get the following response:

HTTP Error: 400 Bad Request

   "error_id": 500,
   "error_name": "internal_error",
   "error_message": "this error has been logged"

But the same POST request works when run from the console at the API doc.

So I used firebug to copy the full URL with parameters that was sent by the test console provided for /posts{id}/comments/add. I also copied the full list of request headers from firebug and tried using a REST client to test the same but I got the same error response as above.

Is there anything I am missing here?

share|improve this question
up vote 2 down vote accepted

You should be POST'ing your parameters, form encoded, rather than putting them on the Url.

GET'ing should fail more gracefully than that though, I'll get a better error message in there in the next deploy.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .