-
Notifications
You must be signed in to change notification settings - Fork 8
Getting started
Mattias Nordqvist edited this page Nov 20, 2017
·
7 revisions
To install Web anchor, run the following command in the Package Manager Console
PM> Install-Package WebAnchor
[BaseLocation("api/customer")]
public interface ICustomerApi
{
[Get("{id}")]
Task<Customer> GetCustomer(int id);
}
....
var customerApi = Api.For<ICustomerApi>("http://localhost:1111/");
await customerApi.GetCustomer(9);
// => HTTP GET http://localhost:1111/api/customer/9
Nice, isn´t it? Read up on the the Basics of Web Anchor and you´ll see how it becomes even nicer. 👍
- Getting started
- Basics (Http GET & Base Location)
- Basics pt. 2 (POST/PUT/DELETE, HttpResponseMessage, Exceptions, HttpClient, IDisposable)
- Building an HttpRequestMessage
- Parameter attributes
- Handling responses
- ApiSettings
- Typical setup (Develop/Test/Production & Mocking)
- Logging
- Testing
- Generic Api
- Multipart