chore(no-release): Helper Functions for Code Refactoring
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
This code adds three helper functions to simplify making HTTP requests to GitLab's API. The functions handle the most common response patterns: one for requests that return a single object (like getting user details), one for requests that return a list of items (like getting all projects), and one for requests that don't return any data (like deleting something). These utilities reduce code duplication by centralizing the common steps of creating a request, sending it, and handling the response, making the codebase cleaner and easier to maintain.
Edited by Yashesvinee V