Problems finding client.Execute<T>()

82 views
Skip to first unread message

Lloyd Bond

unread,
May 18, 2012, 10:00:51 PM5/18/12
to rest...@googlegroups.com
Hey Everybody,
 
I never thought of myself as a newb until now. I have a problem and I a not sure how to solve it.
I have gone around and around trying to find the method Execute<T>(). In all the documentation it is shown to use something like this below
 
****SNIP************
var client = new RestClient();
        client.BaseUrl = BaseUrl;
        client.Authenticator = new HttpBasicAuthenticator(_accountSid, _secretKey);
        request.AddParameter("AccountSid", _accountSid, ParameterType.UrlSegment); // used on every request
        var response = client.Execute<T>(request);   <----- That is what I am trying to do.
        return response.Data;
*****SNIP***********
 
However, using with the VS2010 intellesense all I see is a couple different ExecuteAsync<T>() methods. I pulled up the RestClient header and I see no signs of
Execute() method, only ExecuteAsync(). I thought maybe I was crazy so I looked at the Twilio library and in their sms.cs file they are using Execute<T>() method.
I also looked searched through the object browser in VS2010 with no success.
 
I installed RestSharp via nuget today. I've got version 103.1.0.0. I've tried searching the best I could for a previous posting on this.
 
I would appreciate some help pointing me in the right direction. I just figure there must be some library I a not including or something stupid I am doing.
 
Thanks
-Lloyd
 

Peter Johanson

unread,
May 18, 2012, 10:41:55 PM5/18/12
to rest...@googlegroups.com
Lloyd,

Are you targetting a mobile platform like WP or MonoDroid? If so, those
platforms only support the async versions of the APIs.

-pete
--

Lloyd Bond

unread,
May 18, 2012, 10:45:33 PM5/18/12
to rest...@googlegroups.com
Pete,
 
Thanks for your response, you are right I am targeting WindowsPhone. Well, that certainly explains it. Now I can stop thinking I've lost my mind.
Now I can definitely move on. I appreciate the help.
-Lloyd
Reply all
Reply to author
Forward
0 new messages