0

I have a REST-like PHP service and i don't understand how invoke function of this service from asp.net mvc. Can anybody help?

2
  • Not with me having left my psychic hat at home today. Darn it! Please provide some sort of information as to how you expect us to figure it out for you with no documentation whatsoever... Commented Mar 19, 2012 at 16:01
  • What kind of intormation you want? I have third-party php service and mvc project:) That's all. Commented Mar 19, 2012 at 16:50

1 Answer 1

1

Have you looked into RestSharp?

It makes calling RESTful API's very easy. The example from their documentation for getting a twitter timeline:

// Create the client
var client = new RestClient();

// Set the service url
client.BaseUrl = "http://twitter.com";

// Set an optional authentication
client.Authenticator = new HttpBasicAuthenticator("username", "password");

// Create the request
var request = new RestRequest();

// The request is relative to the client base url
request.Resource = "statuses/friends_timeline.xml";

// Execute the request - the data is stored in the response.
RestResponse response = client.Execute(request);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.