http模块

http服务端

Request结构体

  1. pub struct Request {
  2. pub:
  3. method string
  4. headers map[string]string
  5. cookies map[string]string
  6. data string
  7. url string
  8. user_agent string
  9. verbose bool
  10. mut:
  11. user_ptr voidptr
  12. ws_func voidptr
  13. }

Response结构体

  1. pub struct Response {
  2. pub:
  3. text string
  4. headers map[string]string
  5. cookies map[string]string
  6. status_code int
  7. }

http客户端