/// <summary> /// Gets a document from our StorageAccount /// </summary> /// <param name="container">Describes the needed container.</param> /// <param name="resourceName">Describes the needed resource.</param> /// <param name="storageAccountUrl">The storage account URL.</param> /// <param name="storageAccountKey">The storage account key.</param> /// <returns> /// Returns a JSON you specified with container and resourceName /// </returns> public static string GetDocument(string container, string resourceName, string storageAccountUrl, string storageAccountKey) { BackendCommunication backendcom = new BackendCommunication(); string taskUrl = backendcom.GetDocument(container, resourceName, storageAccountUrl, storageAccountKey); return(taskUrl); }
/// <summary> /// Puts the document. /// </summary> /// <param name="container">The container.</param> /// <param name="resourceName">Name of the resource.</param> /// <param name="body">The body.</param> /// <param name="que">The que.</param> /// <param name="serviceBusConnectionString">The service bus connection string.</param> /// <returns></returns> public static async Task <HttpStatusCode> PutDocument(string container, string resourceName, string body, string que, string serviceBusConnectionString) { BackendCommunication backendcom = new BackendCommunication(); //client.DefaultRequestHeaders.Add("body", serviceBusConnectionString); var content = new StringContent(body.ToString()); HttpResponseMessage responseMessage = await client.PostAsync("http://localhost:7071/api/orders", content); var tmp = 0; HttpStatusCode taskUrl = backendcom.PutDocument(container, resourceName, body, que, serviceBusConnectionString); return(taskUrl); }