Antero Duarte
07/30/2018, 9:33 AMcall.authentication.principal
is always null and I don't know where to start in debugging it...kluck
07/31/2018, 8:54 AMldapAuthenticate
, but I don't understand how I can use my "manager" binding along with a user search. In ktor, there seems to be only a userDNFormat
String to configure the lookup. What am I doing wrong?tipsy
08/01/2018, 12:05 AMget("/", ::dualHandler)
post("/", ::dualHandler)
dave08
08/01/2018, 7:32 AMget
?cy
08/02/2018, 8:09 AM0.9.4-alpha-2
has been published with experimental multiplatform (MPP) HTTP client (android + ios) support. See the reply for details.
❗ This is pre-release versionMatt
08/02/2018, 8:56 AMval UnsupportedMediaType = HttpStatusCode(415, "Unsupported Media Type")
val RequestedRangeNotSatisfiable = HttpStatusCode(416, "Requested Range Not Satisfiable")
val ExceptionFailed = HttpStatusCode(417, "Exception Failed")
val UpgradeRequired = HttpStatusCode(426, "Upgrade Required")
val TooManyRequests = HttpStatusCode(429, "Too Many Requests")
val RequestHeaderFieldTooLarge = HttpStatusCode(431, "Request Header Fields Too Large")
I was wanting to use "422 Unprocessable Entity", but there isn't a constant for it in io.ktor.http.HttpStatusCode
yet. Is it a case of "PRs welcome", or is there a deliberate reason not to include certain codes?Matt
08/02/2018, 7:01 PMget("*") {
call.respond(HttpStatusCode.NotFound, etc)
}
Only matches if there is no more specific route, if I understand it correctly?bdawg.io
08/02/2018, 10:14 PMapplication/x-www-form-urlencoded
strings from a map?bdawg.io
08/02/2018, 10:15 PMrequest
, but I’m trying to build and write them as a respond
enleur
08/03/2018, 2:48 PMbdawg.io
08/03/2018, 9:16 PMinline fun <T> T.scope(block: T.() -> Unit) {
block()
}
it’s `T.run`/`T.apply` without a return value
Edit: moved examples to thread to clean up channel feed
Edit: renamed extension function from unit
to scope
Hamza
08/04/2018, 12:11 AMDeactivated User
08/07/2018, 12:27 AMhallvard
08/07/2018, 6:16 AMvincent.brule
08/07/2018, 11:11 AMNikky
08/07/2018, 11:55 PMlaunch {
while(true) {
//do Work
<http://log.info|log.info>("work complete")
delay(4, TimeUnit.HOURS)
}
}
Hamza
08/08/2018, 2:15 AMdave08
08/08/2018, 6:26 AMcall
or this
inside a Ktor route? Any workaround?Albert
08/08/2018, 8:41 AMembeddedServer(Netty, 8080) {
install(CallLogging) {
level = Level.DEBUG
}
routing {
get("/") {
println(log.isDebugEnabled)
}
}
}.start(wait = true)
log.isDebugEnabled is always returning false
. Should install
be invoked somewhere else? can't really find this in the documentationdave08
08/08/2018, 9:27 AMnbdam
08/08/2018, 4:04 PMzpearce
08/08/2018, 4:35 PMHamza
08/09/2018, 5:08 AMvonox7
08/09/2018, 3:45 PMMohit Gurumukhani
08/09/2018, 6:26 PMnbdam
08/10/2018, 11:48 AMAlbert
08/10/2018, 1:45 PMAntero Duarte
08/10/2018, 2:03 PMDEBUG org.apache.http.wire - http-outgoing-0 >> "POST /the/endpoint HTTP/1.1[\r][\n]"
DEBUG org.apache.http.wire - http-outgoing-0 >> "Content-Type: x-www-form-urlencoded[\r][\n]"
DEBUG org.apache.http.wire - http-outgoing-0 >> "Accept: */*[\r][\n]"
DEBUG org.apache.http.wire - http-outgoing-0 >> "Content-Length: 201[\r][\n]"
DEBUG org.apache.http.wire - http-outgoing-0 >> "Host: localhost:8888[\r][\n]"
DEBUG org.apache.http.wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
DEBUG org.apache.http.wire - http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.3 (Java/1.8.0_172)[\r][\n]"
DEBUG org.apache.http.wire - http-outgoing-0 >> "[\r][\n]"
DEBUG org.apache.http.wire - http-outgoing-0 >> "url_encoded=form_params&which_are=fine"
Everything seems fine, but for some reason, the client is prepending a line before the form body, with just \r\n
, which for some reason is tripping the server on the other end.
I don't control the server I'm sending the request to, I don't know if an empty line before the body conforms to the HTTP Spec, but my question is, is there any way to avoid it?
For completeness sake, the way I'm creating the request is as follows:
ApacheHttpClient.request<HttpResponse> {
method = <http://HttpMethod.Post|HttpMethod.Post>
url { takeFrom("<http://some.url/the/endpoint>") }
headers.append("Content-Type", ContentType.Application.FormUrlEncoded.contentSubtype)
this.body = body.formUrlEncode()
}
body is a List<Pair<String,String>>
and .formUrlEncode
is the extension method from ktor HttpUrlEncode.ktmp
08/10/2018, 2:04 PM\r\n
what separates headers from the body?Yuri
08/10/2018, 9:05 PMContentConverter
as maven artifact similar to jackson one in the future?Yuri
08/10/2018, 9:05 PMContentConverter
as maven artifact similar to jackson one in the future?orangy
08/10/2018, 9:08 PMYuri
08/10/2018, 9:24 PMorangy
08/10/2018, 9:44 PMYuri
08/10/2018, 10:18 PM