Ejemplo n.º 1
0
        public static void Post(string fullUrl, string sdkVersion, CallRequestContainer requestContainer, InvokeRequestDelegate invokeRequest)
        {
            string[] headers = new string[4];
            string[] headerValues = new string[4];

            int h = 0;
            headers[h] = "Content-Type"; headerValues[h++] = "application/json";
            if (requestContainer.AuthType != null)
            {
                headers[h] = requestContainer.AuthType; headerValues[h++] = requestContainer.AuthKey;
            }
            headers[h] = "X-ReportErrorAsSuccess"; headerValues[h++] = "true";
            headers[h] = "X-PlayFabSDK"; headerValues[h++] = sdkVersion;

            PlayFabPluginEventHandler.AddHttpDelegate(requestContainer);

            invokeRequest(requestContainer.Url, requestContainer.CallId, requestContainer.Request, requestContainer.CustomData);

            pf_make_http_request(fullUrl, "POST", h, headers, headerValues, requestContainer.Data, requestContainer.CallId);
Ejemplo n.º 2
0
        public static void Post(string fullUrl, string sdkVersion, CallRequestContainer requestContainer, InvokeRequestDelegate invokeRequest)
        {
            string[] headers      = new string[4];
            string[] headerValues = new string[4];

            int h = 0;

            headers[h] = "Content-Type"; headerValues[h++] = "application/json";
            if (requestContainer.AuthType != null)
            {
                headers[h] = requestContainer.AuthType; headerValues[h++] = requestContainer.AuthKey;
            }
            headers[h] = "X-ReportErrorAsSuccess"; headerValues[h++] = "true";
            headers[h] = "X-PlayFabSDK"; headerValues[h++] = sdkVersion;

            PlayFabPluginEventHandler.AddHttpDelegate(requestContainer);

            invokeRequest(requestContainer.Url, requestContainer.CallId, requestContainer.Request, requestContainer.CustomData);

            pf_make_http_request(fullUrl, "POST", h, headers, headerValues, requestContainer.Data, requestContainer.CallId);