danielrvt-sgb
danielrvt-sgb

Reputation: 1138

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?

Upvotes: 5

Views: 6482

Answers (1)

danielrvt-sgb
danielrvt-sgb

Reputation: 1138

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

Upvotes: 4

Related Questions