Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public static class RestFactory
  2. {
  3. public static RestClient CreateClient(string baseAddress)
  4. {
  5. var restClient = new RestClient(baseAddress);
  6. restClient.AddHandler("application/json", new JsonDeserializer());
  7. return restClient;
  8. }
  9.  
  10. public static RestRequest CreateRequest(string url, Method method)
  11. {
  12. return new RestRequest(url)
  13. {
  14. Method = method,
  15. RequestFormat = DataFormat.Json
  16. };
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement