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
Problems with UPDATE and INSERT #27
Comments
Are you setting the charset in the media type? I don't think that will work. Just use the plain internet media type. I think utf-8 is returned anyway. |
Another effort I suggest is to setup the example DB and SDK. Open up the API explorer and it'll show you request and responses for any ops on a half dozen resources. |
I used the example DB and SDK. The request and response are copy paste from the API explorer |
Which browser and version are you using. Perhaps it is appending the charset. |
i' m using firefox 16.0.2. Tried the same with chrome 22.0.1229.94 and it works fine.... |
You've found a bug. I didn't test the json enhancement with the API explorer and Firefox. I'll add Firefox to the explorer testing from now on. This probably will impact any Firefox app accessing restsql. I will look at fixing this as soon as I can. |
It's interesting that the mozilla team found the addition of the charset to the Content-Type header, when set using XHR.setRequestHeader(), many years ago but decided not to fix it. https://bugzilla.mozilla.org/show_bug.cgi?id=416178 But it doesn't do that to the Accept header. |
Hi,
on fresh setup: win7, tomcat 7.0.32, jdk 1.7.0, restsql 0.8.3
SELECT and DELETE works fine,
but on UPDATE and INSERT this error occurs:
Request:
PUT /restsql/res/Country/2 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Accept: application/json
country=ff
Response:
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
No deserializer found for media type application/x-www-form-urlencoded; charset=UTF-8
For xml:
No deserializer found for media type application/xml; charset=UTF-8
For json:
No deserializer found for media type application/json; charset=UTF-8
thanks for help, ticxx
The text was updated successfully, but these errors were encountered: