Open carlosrafp opened 3 years ago
You have to use HttpQueryInfoW
with HTTP_QUERY_COOKIE
to get the corresponding header.
There's no built-in solution for handling cookies out-of-the-box. The same applies for setting cookies. You need to send Set-Cookie
header manually.
Ty, HttpQueryInfoW worked fine for me,
justed added this code in "WinInetHelper.request", after getResponseData() call
sample:
var lpszData = ByteArray(200)
val dwSize = alloc
Do you Know to to handle https with certificate? In java u should update sdk cacerts, no idea how to do it in klotin/native
HTTPS is supported by the WinInet library and handled transparently, so the certificate has to be available in system.
It's controller by INTERNET_FLAG_SECURE flag. Check MemScope.openRequest(...)
function in WinInetHelper.kt
.
how to get the cookie returned by a Http get?