ddliu / go-httpclient

Advanced HTTP client for golang
MIT License
465 stars 105 forks source link

怎么取消正在请求的client #32

Closed fzkun closed 4 years ago

afghanistanyn commented 4 years ago

may be you can try context.WithCancel

ddliu commented 4 years ago

may be you can try context.WithCancel

Thank you for your idea @afghanistanyn.

@fzkun It's now supported, see test file for example: https://github.com/ddliu/go-httpclient/blob/7e31de4a0428a364effb5d16b85a539056280793/httpclient_test.go#L755