Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add retryIf function to client agent #1726

Merged
merged 1 commit into from Jan 27, 2022

Conversation

vecpeng
Copy link
Contributor

@vecpeng vecpeng commented Jan 21, 2022

RetryIf function for client agent.

func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent {
	a.HostClient.RetryIf = retryIf
	return a
}

Examples:

agent.Get("https://example.com").RetryIf(func (req *fiber.Request) bool {
	return req.URI() == "https://example.com"
}

@ReneWerner87
Copy link
Member

ReneWerner87 commented Jan 21, 2022

Thx, don't forget the doc repository.

@ReneWerner87
Copy link
Member

ReneWerner87 commented Jan 24, 2022

@vecpeng
Don't forget the documentation repository
https://github.com/gofiber/docs

@ReneWerner87 ReneWerner87 merged commit 6036f40 into gofiber:master Jan 27, 2022
14 checks passed
@ReneWerner87
Copy link
Member

ReneWerner87 commented Jan 27, 2022

@vecpeng can you create another pull request for the documentation repository?

@tomaswarynyca
Copy link
Contributor

tomaswarynyca commented Jan 27, 2022

It seems to me that it is already done gofiber/docs#230

@ReneWerner87
Copy link
Member

ReneWerner87 commented Jan 27, 2022

Oh thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants