by community-syndication | Nov 2, 2013 | BizTalk Community Blogs via Syndication
Microsoft just releases two cumulative update packages for BizTalk 2013: Cumulative Update Package 2 for BizTalk Server 2013 and Cumulative Update Package 1 for BizTalk Adapter Pack 2013! Cumulative update package 2 for BizTalk Server 2013 Cumulative update package 2 for Microsoft BizTalk Server 2013 contains hotfixes for the BizTalk Server 2013 issues that were […]
Blog Post by: Sandro Pereira
by community-syndication | Nov 1, 2013 | BizTalk Community Blogs via Syndication
This post is the twenty-third in a weekly series intended to briefly spotlight those things that you need to know about new features in BizTalk Server 2013. Assuming that one of the major benefits of using Windows Azure BizTalk Services is being able to offload some of our EDI processing to the cloud, then a […]
Blog Post by: Nick Hauenstein
by community-syndication | Nov 1, 2013 | BizTalk Community Blogs via Syndication
This might be one of my shorter post, but I thought it was worth sharing. I’ve been working with a game lately and depend heavily on Azure Mobile Services. Microsoft has been kind enough to provide us with the Azure Mobile Services for Xamarin, which can be found here. Sadly thought, it does not include support for API’s.
You can do this:
var profiles = App.MobileService.GetTable<UserProfile>();
But you can’t do this:
var myProfile = App.MobileService.InvokeApiAsync<UserProfile>("me");
I find API’s much more useful the working with the tables, so I was bit bummed out when I found out it wasn’t supported. I solved this by simply using the HttpClient to make the calls to the API’s. However that didn’t work to good when enabling the authorization.
It took a bit of work with fiddler to find our what headers needed to be used. So I updated the calls to include these headers:
HttpContent content = new StringContent(payload);
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
content.Headers.Add("x-zumo-application", Client.ApplicationKey);
content.Headers.Add("x-zumo-auth", Client.CurrentUser.MobileServiceAuthenticationToken);
var response = await client.PostAsync(url, content);
That did the trick, and I could now call the API with the permissions != Everyone.
– But I was still bothered by the lack of support for API’s, since that meant I couldn’t share my code across the platforms. Of course I could have used the HttpClient approach above with my Windows Phone clients, but that didn’t seem right.
So I spent some time adding the missing InvokeApi* methods as Extension Methods. And you can download the code here:
To use it, simply download the MobileServiceClientExtensionMethods.cs file and add it to your project. You should update the namespace, and the just add the namespace in the using statement in the class where you want to make the call.
HTH
Mikael
Blog Post by: wmmihaa