Hi,
I need some help, I´m making a post to an URL which is uses HTTPS, previously I was using POST in a HTTP but
when it changed to HTTPS the POST couldn´t be send, what should I change or add to my POST code?
Kind Regards,
Fredy
/*********************************Post Code*************************************************/
bool sendStatus() {
char postObjStr[1024];
ParsedJsonDataSet JsonOutObject;
ParsedJsonDataSet JsonInObject;
JsonOutObject.StartBuilding();
JsonOutObject.Add("action", "aeiCommand");
JsonOutObject.Add("command", "integraAeiProcessLogData");
JsonOutObject.Add("userId", "Integra");
JsonOutObject.DoneBuilding();
logg.newPrint("\nStatus out: ");
JsonOutObject.PrintObjectToBuffer(postObjStr, 1024);
logg.newPrint(postObjStr);
ParsedURI uri(getUrl("integraAeiProcessLogData"));//get the server url
//send the post Object (JsonOutObject) and obteins the server answer into JsonInObject
bool result = DoJsonPost(uri, JsonOutObject, JsonInObject, NULL,10 * TICKS_PER_SECOND);
//print JSON result
logg.newPrint("\nStatus in: ");
if(result){
memset(postObjStr,'\0',1024);
JsonInObject.PrintObjectToBuffer(postObjStr, 1024);
logg.newPrint(postObjStr);
}else{
logg.newPrint("POST could not be sent\n");
}
return result;
}
Post tO HTTPS
Re: Post tO HTTPS
Several things...
Does the url returned form GetUrl have http or https at the begining?
Are you on the 2.X or 3.X platform?
Make sure SSL support is turned on in the predef.h file...
Make sure #define WEB_CLIENT_SSL_SUPPORT (1) Is also turned on....
nburn\include\predef.h //2.X
nburn\nbrtos\include\predef.h //3.x
We have been doing a bunch of work in this space so make sure you have the very latest release.
Does the url returned form GetUrl have http or https at the begining?
Are you on the 2.X or 3.X platform?
Make sure SSL support is turned on in the predef.h file...
Make sure #define WEB_CLIENT_SSL_SUPPORT (1) Is also turned on....
nburn\include\predef.h //2.X
nburn\nbrtos\include\predef.h //3.x
We have been doing a bunch of work in this space so make sure you have the very latest release.