aa
07/10/2017, 3:50 PMval response = window.fetch(url, object: RequestInit {
override var method: String? = method
override var body: dynamic = body
override var credentials: RequestCredentials? = RequestCredentials.Companion.INCLUDE
override var cache: RequestCache? = RequestCache.Companion.NO_CACHE
override var mode: RequestMode? = RequestMode.Companion.NO_CORS
override var headers: dynamic = json("Accept" to "application/json")
}).await()
this is so weird, i can set Accept in the header just fine, but when I try and set another header value, it doesn't come thrubashor
07/10/2017, 4:13 PMoverride var headers
twice?aa
07/10/2017, 4:14 PMoverride var headers: dynamic = json("User-Id" to "ewfwefwe")
aa
07/10/2017, 4:14 PMaa
07/10/2017, 4:14 PMaa
07/10/2017, 4:14 PMbashor
07/10/2017, 4:16 PMaa
07/10/2017, 4:16 PMaa
07/10/2017, 4:16 PMaa
07/10/2017, 4:19 PMbashor
07/10/2017, 4:34 PMbashor
07/10/2017, 4:34 PMaa
07/10/2017, 4:37 PMbashor
07/10/2017, 4:37 PMbashor
07/10/2017, 4:38 PMawait
just waits returned Promiseaa
07/10/2017, 4:38 PMbashor
07/10/2017, 4:39 PMkotlin-fullstack-sample
or with your own code?aa
07/10/2017, 4:40 PMbashor
07/10/2017, 4:41 PMaa
07/10/2017, 4:41 PMrequire 'socket'
s = TCPServer.new 8080
loop do
c = s.accept # Wait for a client to connect
while line = c.gets # Read lines from socket
puts line # and print them
end
end
aa
07/10/2017, 4:41 PMkonsoletyper
07/10/2017, 4:42 PMbashor
07/10/2017, 4:42 PMkonsoletyper
07/10/2017, 4:42 PMfetch
method?aa
07/10/2017, 4:44 PMaa
07/10/2017, 4:44 PMbashor
07/10/2017, 4:49 PMaa
07/10/2017, 4:50 PMbashor
07/10/2017, 4:51 PMaa
07/10/2017, 4:52 PM