const.go 787 B

123456789101112131415161718192021222324252627282930
  1. package xhttp
  2. import (
  3. "time"
  4. )
  5. // const
  6. const (
  7. // ContentType header Content-Type
  8. ContentType = `Content-Type`
  9. // AcceptEncoding header Accept-Encoding
  10. AcceptEncoding = `Accept-Encoding`
  11. // ContentTypeURL application/x-www-form-urlencoded
  12. ContentTypeURL = `application/x-www-form-urlencoded; charset=utf-8`
  13. // ContentTypeJSON application/json
  14. ContentTypeJSON = `application/json; charset=utf-8`
  15. // ContentTypeXML application/xml
  16. ContentTypeXML = `application/xml; charset=utf-8`
  17. // ContentTypeMultipart multipart/form-data
  18. ContentTypeMultipart = `multipart/form-data`
  19. )
  20. var (
  21. readTimeout = 30 * time.Second
  22. readHeaderTimeout = 30 * time.Second
  23. writeTimeout = 30 * time.Second
  24. idleTimeout = 30 * time.Second
  25. shutTimeout = 30 * time.Second
  26. )