Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

feat: added 'NewPutQueryRequest' to support the 'integrations' endpoint #2041

Closed
wants to merge 1 commit into from

Conversation

jgangemi
Copy link
Contributor

Resolves #2040

I refactored the code ever so slightly to not duplicate building the url or setting the headers on the request. I also didn't want to modify the existing NewRequest method signature and cause a cascade of changes elsewhere, so i just added a new method.

Includes a test.

@svanharmelen
Copy link
Member

Cross posting this update so all info is here as well: I thought to remember something about the API actually accepting both query strings and payload body and I found the docs mentioning this: https://docs.gitlab.com/ee/api/rest/#request-payload

If you read closely, you also notice that they write that usually only GET requests use query strings and POST and PUT requests use payload body (quite the default with REST). So that matches exactly with what this package does and so I don't know how you came to the conclusion that this needed to be a call that specifically needs to use query params, but I think your assumption might be incorrect...

@jgangemi
Copy link
Contributor Author

you're right - i'm not sure why this wasn't working originally but it mostly works now w/ #2042, which is still missing a few fields but i'll post there.

@jgangemi jgangemi closed this Oct 17, 2024
@jgangemi jgangemi deleted the jae/issue-2040 branch October 17, 2024 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support 'PUT' requests that send parameters via the query string
2 participants