feat: http downloader

This commit is contained in:
liwei committed 2020-08-03 18:35:50 +08:00
1 parent 15e5d2af3b
commit 788376eaa9
22 files changed
+813 -64

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
package common
type Status int
const (
DownloadStatusReady Status = iota
DownloadStatusStart
DownloadStatusPause
DownloadStatusError
DownloadStatusDone
)
const (
HttpCodeOK = 200
HttpCodePartialContent = 206
HttpHeaderRange = "Range"
HttpHeaderContentLength = "Content-Length"
HttpHeaderContentRange = "Content-Range"
HttpHeaderContentDisposition = "Content-Disposition"
HttpHeaderRangeFormat = "bytes=%d-%d"
)