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

Implemented doRequest helper method #557

Merged

Conversation

ezilber-akamai
Copy link
Contributor

@ezilber-akamai ezilber-akamai commented Jul 19, 2024

📝 Description

Added a private “doRequest” generic helper that accepts the following parameters:

  • The method of the request
  • An optional object to use as the body for the request
  • An optional pointer to an object to unmarshal the response body to
  • A slice of functions that can be used to mutate the underlying http.Request directly before the request is executed

✔️ How to Test

Pull down this PR locally before running tests.

Unit Tests

make testunit

@ezilber-akamai ezilber-akamai marked this pull request as ready for review July 22, 2024 14:55
@ezilber-akamai ezilber-akamai requested a review from a team as a code owner July 22, 2024 14:55
@ezilber-akamai ezilber-akamai requested review from jriddle-linode and yec-akamai and removed request for a team July 22, 2024 14:55
@ezilber-akamai ezilber-akamai added the improvement for improvements in existing functionality in the changelog. label Jul 22, 2024
Copy link
Contributor

@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

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

Works well locally, nice job! Just a small comment.

client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
client.go Outdated Show resolved Hide resolved
@ezilber-akamai ezilber-akamai force-pushed the TPT-2961-base-request-function branch 6 times, most recently from 35b1ff6 to 757eec6 Compare July 29, 2024 14:42
client.go Outdated Show resolved Hide resolved
Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

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

Looks perfect, nice work!

@ezilber-akamai ezilber-akamai merged commit a9e3be2 into linode:main Jul 29, 2024
4 checks passed
@ezilber-akamai ezilber-akamai deleted the TPT-2961-base-request-function branch July 29, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement for improvements in existing functionality in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants