I am able to make a C# library call to a queue using the SDK. However I am unable to make a REST call to the queue.
How shall I proceed? Any code sample will be appreciated.
I am able to make a c# library call to a queue using SDK. However i am unable to make a Rest Call to the queue. How shall i proceed and Any code sample will be appreciated.
Firstly, this link lists the REST operations for working with message queues that Azure Storage provides, please check the link to get detailed informations.
Secondly, here is a sample request to create a queue under the given account, you could construct your request like this.
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(string.Format(CultureInfo.InvariantCulture,
"https://{0}.queue.core.windows.net/{1}",
StorageAccount, queuename));
req.Method = "PUT";
req.Headers.Add("Authorization", AuthorizationHeader);
req.Headers.Add("x-ms-date", mxdate);
req.Headers.Add("x-ms-version", storageServiceVersion);
req.ContentLength = 0;
and please refer to the following code and Authentication for the Azure Storage Services to construct the signature string for generating AuthorizationHeader.
string canonicalizedHeaders = string.Format(
"x-ms-date:{0}\nx-ms-version:{1}",
mxdate,
storageServiceVersion);
string canonicalizedResource = string.Format("/{0}/{1}", StorageAccount, queuename);
string stringToSign = string.Format(
"{0}\n\n\n\n\n\n\n\n\n\n\n\n{1}\n{2}",
requestMethod,
canonicalizedHeaders,
canonicalizedResource);
the request looks like this.