We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example posting JSON as an object:
Map requestDoc = ... request().json(requestDoc).post("create"); JSONMap response = responseContentMap(); ... JSONList response = responseContentList();
The text was updated successfully, but these errors were encountered:
@POST public void index1(){ JSONMap request = ..... respondJSON(request); }
The method respondJSON() also sets the Content-Type=application/json
respondJSON()
request().json(obj).post("index1");
will convert the obj to a JSON format (String, Map, List, Object). Will also set Content-Type=application/json automatically
obj
JSONList responseList = responseJSONList(); JSONMap responseMap = responseJSONMap();
Sorry, something went wrong.
#1258 - Add convenience methods to controller specs to work with JSON
39b6817
ipolevoy
No branches or pull requests
Example posting JSON as an object:
The text was updated successfully, but these errors were encountered: