Issue with CCHttpRequest

I need Request Data:

{ msgHead:{cmdCode:1000} ,
msgBody:{username:xxx , password:123}
}

How do….

data is Nested

These Can not be, is not Nested

const char * data = "username=xxx&password=123"
pRequest->setRequestData(data, strlen(data));

has solved

  • code

    std::vector headers;
    headers.push_back(“Content-Type: application/json; charset=utf-8”);
    pRequest->setHeaders(headers);