1

The following code:

auto nullValue = json::value::null();
std::string searchText = conversions::to_utf8string("michael");
make_request(client, methods::GET, nullValue, searchText);

Returns the json data:

{"data":[
  {
    "_id":172,"name":"Michael Edano","profile_picture":null
  }],
  "success":true
}

But if i put Japanese string:

auto nullValue = json::value::null();
std::string searchText = conversions::to_utf8string("北島 美奈");
make_request(client, methods::GET, nullValue, searchText);

The output is:

provided uri is invalid: /api/authenticate/searchStaffs/?? ??

But the expected output is:

{"data":[{"_id":12,"name":"北島 美奈","profile_picture":null}],"success":true}

What is the cause of this?

Fantastic Mr Fox
  • 32,495
  • 27
  • 95
  • 175
noyruto88
  • 767
  • 2
  • 18
  • 40

1 Answers1

0

all you need to do is

auto nullValue = json::value::null();
std::wstring searchText =L"北島 美奈";
make_request(client, methods::GET, nullValue, searchText);

hopefully it helps

Ken
  • 47
  • 6