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

Add CSAPI.MustDoWithStatus(Raw) method #40

Merged
merged 3 commits into from
Nov 18, 2020
Merged

Conversation

anoadragon453
Copy link
Member

These methods are analogous with their CSAPI.MustDo equivalents other than that they require an expected status code to be specified.

This is a convenience to be used when making calls that we expect with return a non-2xx HTTP status code.

@anoadragon453 anoadragon453 requested a review from kegsay November 17, 2020 16:47
t.Fatalf("CSAPI.MustDoWithStatusRaw %s %s error: %s", method, strings.Join(paths, "/"), err)
}
if res.StatusCode != status {
t.Fatalf("CSAPI.MustDoWithStatusRaw %s %s returned HTTP %d", method, res.Request.URL.String(), res.StatusCode)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please log what was expected as well.

@kegsay kegsay merged commit 99a9ab9 into master Nov 18, 2020
@anoadragon453 anoadragon453 deleted the anoa/must_do_with_status branch November 18, 2020 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants