2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations
2021-11-04 08:50 AM
Hi,
I am trying to send data in JSON format in an HTTP request like this:
GS::UniString uriString = "https://domain/api";
IO::URI::URI connectionUrl(uriString);
ClientConnection clientConnection(connectionUrl);
GS::ObjectState requestOs;
requestOs.Add("param1", "val1");
requestOs.Add("testKey2", "val2");
JSON::CreateFromObjectState(requestOs, clientConnection.BeginSend(request));
clientConnection.FinishSend();
But I am not receiving the JSON in the request on the server side (PHP).
Is this the correct way to send JSON data in an HTTP request?
Please help! ( @Tibor Lorantfy ? )
Thanks.
2023-01-24 05:46 PM
You are probably missing a
clientConnection.Connect();
right after you initialized clientConnection.