RestSharp execute sync, not async

Is there a way to use restsharp synchronously? Every method I see in Visual Studio has the “async” postfix and the restsharp main page, (which has the following example):

// execute the request
RestResponse response = client.Execute(request);
var content = response.Content; // raw content as string

Clearly makes the distinction between sync and async requests:

// easy async support
client.ExecuteAsync(request, response => {
    Console.WriteLine(response.Content);
});

How can I access this “Execute” sync method?

Answer

I asked in their googlegroups and they said that it is because of “platorm limitations” when using wp7. Pretty neat right?

Leave a Reply

Your email address will not be published. Required fields are marked *