Skip to content

Commit e5ccb79

Browse files
authored
Merge pull request gocolly#858 from Shinku-Chen/IsAbort
add IsAbort for Request
2 parents ea086c2 + 05ffb0c commit e5ccb79

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

request.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ func (r *Request) Abort() {
9191
r.abort = true
9292
}
9393

94+
// IsAbort returns true if the request has been aborted
95+
func (r *Request) IsAbort() bool {
96+
return r.abort
97+
}
98+
9499
// AbsoluteURL returns with the resolved absolute URL of an URL chunk.
95100
// AbsoluteURL returns empty string if the URL chunk is a fragment or
96101
// could not be parsed

0 commit comments

Comments
 (0)