Skip to content

Commit 525fc1c

Browse files
committed
post request issue fixed on windows
1 parent f908361 commit 525fc1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/countly.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ log(Countly::LogLevel::DEBUG, "[Countly][sendHTTP] data: "+ data);
705705
}
706706

707707
if (hRequest) {
708-
bool ok = WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, use_post ? (LPVOID)data.data() : WINHTTP_NO_REQUEST_DATA, use_post ? data.size() : 0, 0, 0) != 0;
708+
bool ok = WinHttpSendRequest(hRequest, use_post ?L"content-type:application/x-www-form-urlencoded" : WINHTTP_NO_ADDITIONAL_HEADERS, 0, use_post ? (LPVOID)data.data() : WINHTTP_NO_REQUEST_DATA, use_post ? data.size() : 0, use_post ? data.size() : 0, 0) != 0;
709709
if (ok) {
710710
ok = WinHttpReceiveResponse(hRequest, NULL);
711711
if (ok) {

0 commit comments

Comments
 (0)