GooglePlayInstant/Editor/QuickDeploy/GcpClient.cs
/// <summary>
/// Sends a request to GCP to change visibility of specified file to public, and invokes the result handler
/// action on the HTTP response.
/// </summary>
/// <param name="onMakeBundlePublicResponseAction">An action to be invoked on the WWW instance holding the HTTP
/// request once the response to the request to make the bundle public is available.</param>
Sends a request to GCP to change visibility of specified file to public, and invokes the result handler
action on the HTTP response.
Sends a request to GCP to change visibility of specified file to public and invokes the result handler action on the HTTP response .
private static void MakeBundlePublic(Action<WWW> onMakeBundlePublicResponseAction)
        {
            var makePublicEndpoint = string.Format("https://www.googleapis.com/storage/v1/b/{0}/o/{1}/acl",
                QuickDeployWindow.Config.CloudStorageBucketName, QuickDeployWindow.Config.CloudStorageObjectName);
            var requestJsonContents = JsonUtility.ToJson(new PublicAccessRequest());
            var makeBundlePublicWww = SendAuthenticatedPostRequest(makePublicEndpoint,
                Encoding.UTF8.GetBytes(requestJsonContents), "application/json");
            WwwRequestInProgress.TrackProgress(makeBundlePublicWww, "Making remote file public",
                onMakeBundlePublicResponseAction);
        }
private static void MakeBundlePublic ( Action < WWW > onMakeBundlePublicResponseAction ) { var makePublicEndpoint = string . Format ( " " , QuickDeployWindow . Config . CloudStorageBucketName , QuickDeployWindow . Config . CloudStorageObjectName ) ; var requestJsonContents = JsonUtility . ToJson ( new PublicAccessRequest ( ) ) ; var makeBundlePublicWww = SendAuthenticatedPostRequest ( makePublicEndpoint , Encoding . UTF8 . GetBytes ( requestJsonContents ) , " " ) ; WwwRequestInProgress . TrackProgress ( makeBundlePublicWww , " " , onMakeBundlePublicResponseAction ) ; }
Sends a request to GCP to change visibility of specified file to public, and invokes the result handler
action on the HTTP response.
Sends a request to GCP to change visibility of specified file to public and invokes the result handler action on the HTTP response .
// see https://cloud.google.com/storage/docs/access-control/making-data-public on making data public.
onMakeBundlePublicResponseAction
Action<WWW>
An action to be invoked on the WWW instance holding the HTTP
request once the response to the request to make the bundle public is available.
An action to be invoked on the WWW instance holding the HTTP request once the response to the request to make the bundle public is available .