Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class RestFactory
- {
- public static RestClient CreateClient(string baseAddress)
- {
- var restClient = new RestClient(baseAddress);
- restClient.AddHandler("application/json", new JsonDeserializer());
- return restClient;
- }
- public static RestRequest CreateRequest(string url, Method method)
- {
- return new RestRequest(url)
- {
- Method = method,
- RequestFormat = DataFormat.Json
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement