You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.2 KiB
C++

<EFBFBD><EFBFBD>#include <cassert>
#include <iostream>
#include "webcc/client_session.h"
#include "webcc/logger.h"
#include "encoding.h"
int main() {
WEBCC_LOG_INIT("", webcc::LOG_CONSOLE);
webcc::ClientSession session;
webcc::ResponsePtr r;
try {
r = session.Send(webcc::RequestBuilder{}.
Get("http://httpbin.org/get").
Query("name", Utf16ToUtf8(L"~<7E>%f<>^"), true)
());
assert(r->status() == webcc::Status::kOK);
} catch (const webcc::Error& error) {
std::cerr << error << std::endl;
return 1;
}
return 0;
}