Tusya <3
Tusya <3
JCHJava Community | Help. Code. Learn.
Created by Tusya <3 on 10/23/2024 in #java-help
(Perhaps offtopic) Tell me about play framework
I'm considering rewriting my kotlin (ktor) backend app with scala And as i got, there is no huge scala backend frameworks except for play, so... how is it? Does it worth it? How it feels in comparison with other mvc frameworks like spring? Does it giving enough freedom? Any experience or suggestion is appreciated ^^
10 replies
JCHJava Community | Help. Code. Learn.
Created by Tusya <3 on 8/16/2024 in #java-help
Any ideas how to render images in console?
No description
23 replies
JCHJava Community | Help. Code. Learn.
Created by Tusya <3 on 8/14/2024 in #java-help
io.ktor.http.BadContentTypeFormatException: Bad Content-Type format: content-type: application/json
For some reason calling response.contentType() causes this exception
class ErrorUI (private val response: HttpResponse) {

init {
runBlocking {
println("content type = "+response.contentType()) // <-- exception occures here


// if json
if (response.contentType() == ContentType.Application.Json) {
...
} else {
...
}
class ErrorUI (private val response: HttpResponse) {

init {
runBlocking {
println("content type = "+response.contentType()) // <-- exception occures here


// if json
if (response.contentType() == ContentType.Application.Json) {
...
} else {
...
}
Exception in thread "main" io.ktor.http.BadContentTypeFormatException: Bad Content-Type format: content-type: application/json
at io.ktor.http.ContentType$Companion.parse(ContentTypes.kt:135)
Exception in thread "main" io.ktor.http.BadContentTypeFormatException: Bad Content-Type format: content-type: application/json
at io.ktor.http.ContentType$Companion.parse(ContentTypes.kt:135)
If i change marked line to println( response.headers.get("content-type") ) ill get "application/json" as expected
8 replies
JCHJava Community | Help. Code. Learn.
Created by Tusya <3 on 8/9/2024 in #java-help
Anyone can help with ktor?
No description
7 replies
JCHJava Community | Help. Code. Learn.
Created by Tusya <3 on 7/29/2024 in #java-help
Suggest kotlin/java backend framework
I tried ktor, but its documentation is... too difficult I didnt found how to set up cookies, auto documentation and stuff Or im just too dumb for it 😦
13 replies