Illegal character ((CTRL-CHAR, code 31))

2,329 views
Skip to first unread message

Cenk Bircanoğlu

unread,
Oct 3, 2013, 2:52:18 AM10/3/13
to javas...@googlegroups.com
I am working on a spring mvc project. When i try to post a json data with rest client (Chrome's) it returns 201 Http status but when i post json data with ajax function it return this:

Caused by: org.codehaus.jackson.JsonParseException: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens

why it will be? each ones request headers and request body are same.  

Devendra Tiwari

unread,
Nov 11, 2016, 3:57:56 AM11/11/16
to javasupport
I am facing same issue. Any solution found?

Ketan Bhagwat

unread,
Dec 18, 2018, 4:39:45 AM12/18/18
to javasupport
I am also facing the same issue, however it is working fine with curl command . Any soltion?

the difference between curl and httpclient execution is only one header change
in curl m using contentType: "application/json; charSet:UTF-8"
and from httpClient it is contentType:"application/json
Reply all
Reply to author
Forward
0 new messages