http.h 874 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. filesummary.CH: 提供一个用于发送Http请求的函数,需要先包含autotree.h
  3. filesummary.EN: Provide a function used to send http request, require include autotree.h first
  4. CH: 表示Http请求的类型
  5. EN: Representation the type of http request
  6. */
  7. typedef builtin HttpMethod;
  8. /*
  9. CH: 表示Post请求
  10. EN: Representation Http Post
  11. */
  12. HttpMethod http_post;
  13. /*
  14. CH: 表示Get请求
  15. EN: Representation Http Get
  16. */
  17. HttpMethod http_get;
  18. /*
  19. CH: 发送Http请求
  20. EN: Send a http request
  21. url.CH: 请求的URL
  22. url.EN: URL Address
  23. method.CH: 请求类型,可以是http_get或http_post
  24. method.EN: Request Type, can be http_get or http_post
  25. args.CH: 请求参数
  26. args.EN: Request Parameters
  27. header.CH: 请求附加头部
  28. header.EN: Additional header for request
  29. */
  30. AutoTree http_send(char *url, HttpMethod method, AutoTree args, AutoTree header);