Java server side cannot process requests of contentType "www-form-urlencoded" from Editor Ajax call
Java server side cannot process requests of contentType "www-form-urlencoded" from Editor Ajax call
![Zhen](https://secure.gravatar.com/avatar/82271843dc00b717688cdf8cff531b98/?default=https%3A%2F%2Fvanillicon.com%2F82271843dc00b717688cdf8cff531b98_200.png&rating=g&size=120)
Editor's Ajax call always sends request payload of contentType "www-form-urlencoded".
This contentType cannot be changed by setting its Ajax options "contentType" to "application/json" and "dataType" to "json".
I find that Editor's Ajax call with a bit complicated request data cannot be processed on Java server side (Spring REST & MVC)
due to the error in object mapping.
How to resolve this problem?
This discussion has been closed.
Answers
Is sending the data as raw JSON an option? Most server-side environments have that ability and I assume Spring is no exception. You can use:
in Editor's configuration to do that.
Allan