tuarua Thanks for the links! But I am still confused about the above format, ie the -u, -H, -d.
I was using another service(loggly) to send the same, but that was straight forward, sharing the code below!
var data:Object = {
installationId: installationID,
startTime: DateUtil.toString(newSession.mStartTime),
gameVersion: gameVersion,
languageCode: Capabilities.language,
deviceInfo: {
resolution: resolution,
os: Capabilities.os,
flashPlayerType: Capabilities.playerType,
flashPlayerVersion: Capabilities.version
}
};
if (lastSession)
{
lastSession.pause();
data.firstStartTime = DateUtil.toString(lastSession.firstStartTime);
data.lastStartTime = DateUtil.toString(lastSession.startTime);
data.lastDuration = lastSession.duration;
data.lastLog = lastSession.log;
}
public static function sendLog(data:Object):void {
var url:String = "https://logs-01.loggly.com/inputs/";
var token:String = "APP-TOKEN-XXX-XXXX-XXX";
var request:URLRequest = new URLRequest(url + token);
request.method = URLRequestMethod.POST;
request.data = JSON.stringify(data);
var requestor:URLLoader = new URLLoader();
requestor.addEventListener( Event.COMPLETE, httpComplete );
requestor.addEventListener( IOErrorEvent.IO_ERROR, httpFail );
requestor.addEventListener( SecurityErrorEvent.SECURITY_ERROR, httpFail );
requestor.load( request );
}
I just wanted to know if
"https://logs.logdna.com/logs/ingest?hostname=EXAMPLE_HOST&mac=C0:FF:EE:C0:FF:EE&ip=10.0.1.101&now=$(date +%s)" \
-u INSERT_INGESTION_KEY: \
-H "Content-Type: application/json; charset=UTF-8" \
-d \
should be the url in sendLog()