HttpClient.cs 713 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace cuidian.OpenApi.Http
  7. {
  8. public class HttpClient
  9. {
  10. private WebUtils _webUtils = new WebUtils();
  11. public Response Get(string url, IDictionary<string, string> parameters)
  12. {
  13. return new Response(this.WebUtils.Get(url, parameters));
  14. }
  15. public Response Post(string url, IDictionary<string, string> parameters, string data)
  16. {
  17. return new Response(this.WebUtils.Post(url, parameters, data));
  18. }
  19. protected WebUtils WebUtils
  20. {
  21. get { return this._webUtils; }
  22. }
  23. }
  24. }