restsharp

Using restsharp in c# to consume last.fm services

Hi I'm trying to connect to the last.fm rest services using restsharp. I can deserialize the simple data found at the example: http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&amp;artist=Cher&amp;api_key=b25b959554ed76058ac220b7b2e0a026 however, when i reach the images section for the artist: <artist> <name>Cher</name> <...

Using RestSharp in Windows Phone 7

I'm trying to use RestSharp (http://restsharp.org/) in a Windows Phone 7 project, but I'm having an issue it seems with the Newtonsoft Json.NET library that RestSharp uses. When I'm trying to execute my code like so: _restClient.ExecuteAsync<Model.Song>(restRequest, (response) => { if (response.StatusCode == HttpStatusCode.OK) { } ...

POSTing XML with non-ASCII characters

I'm trying to patch RestSharp for it to be able to POST XMLs with non-ASCII characters as POST request body. Here's how it gets written: private void WriteRequestBody(HttpWebRequest webRequest) { if (HasBody) { webRequest.ContentLength = RequestBody.Length; var requestStream = webRequest.GetRequestStream(); ...

Problem adding body to RestSharp RestRequest using enums

I am using RestSharp in ASP .NET MVC 2 project. Trying to create RestRequest (using POST method) and add two enum values (my enum type -- OrderStatusFlags) to request body -- using build-in RestSharp XmlSerializer: var request = new RestRequest("orders/{vendorID}/{number}", Method.POST); request.AddBody(previousOrderStatus); request.Ad...

RestSharp v. WebClient?

I'm building a Windows Phone 7 Silverlight app. Is there any reason to use RestSharp instead of WebClient? I've looked around on the RestSharp site, but it's not immediately obvious what the benefits are. ...