2019-08-07 03:58 AM - last edited on 2022-09-29 10:19 AM by Daniel Kassai
2019-08-07 07:12 AM
2020-08-19 09:56 AM
2020-09-18 09:57 AM
2021-06-16 10:22 AM
Kengey wrote:Can you please write some code after "//do whatever you want", like how to get values from the object?
Use a JSON::JDOMParser to parse the client's response into a JSON object:
HTTP::Client::Response response;
JSON::JDOMParser parser;
JSON::ValueRef parsed = parser.Parse(client->BeginReceive(response));
// check statuscode
auto statusCode = response.GetStatusCode();
if (statusCode == HTTP::MessageHeader::StatusCode::OK) {
JSON::ObjectValueRef object = GS::DynamicCast<JSON::ObjectValue>(parsed);
// do whatever you need with 'object'
}
2021-06-17 04:31 PM