c++ L"string"이 뭔가요?

조회수 6206회
    json::value obj;

obj[L"title"] = json::value::string(U("count1"));
obj[L"num"] = json::value::number(1);


wcout << obj << endl;


// http post request 생성
http_client client(U("http://localhost:3000/count"));

http_request request(methods::POST);
request.headers().add(L"Content-Type", L"application/json; charset=UTF-8");
request.headers().add(L"Content-Length", L"100");
request.headers().add(L"Host", L"testhost.com");
request.headers().add(L"X-Requested-With", L"XMLHttpRequest");
request.set_body(obj);

// request에 대한 response 해석
auto resp = client.request(request).get();

wcout << U("STATUS : ") << resp.status_code() << endl;
wcout << "content-type : " << resp.headers().content_type() << endl;
wcout << resp.extract_string(true).get() << endl;

다음과 같이 C++에서 post request를 만들어 json 데이터를 보내던 중에 L"~~~" 에 관해 질문드립니다.

포멧 형식같은 것 같은데 자세히 알고 싶습니다.

  • (•́ ✖ •̀)
    알 수 없는 사용자

1 답변

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)