call.respond(Object) cause error
See original GitHub issueAt sample json for example:
java.lang.IllegalArgumentException: Response pipeline couldn't transform 'class org.jetbrains.ktor.samples.json.Model' to the FinalContent
//ktor-test-host used
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Do we need to close the response object if an error occurs ...
General concept is that when a function (or method) has multi return values one being an error , error should be checked first...
Read more >HTTP response status codes - MDN Web Docs - Mozilla
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Read more >Python requests.Response Object - W3Schools
Property/Method Description
apparent_encoding Try it Returns the apparent encoding
close() Try it Closes the connection to the server
content Try it Returns the content of the...
Read more >Sending responses | Ktor
For example, with the enabled ContentNegotiation plugin, you can send a data object serialized in a specific format. The call.response property ...
Read more >Request and response objects - Django documentation
So, for example, a header called X-Bender would be mapped to the META key HTTP_X_BENDER . Note that runserver strips all headers with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same problem. @cy6erGn0m Gson is installed, and @orangy application/json is set both for request and response. but the only thing works is that I manually convert to Json like this:
call.respond(gson.toJson(myObject))
Same Issue: