Skip to content

Conversation

seiimonn
Copy link

@seiimonn seiimonn commented Oct 7, 2024

The current SDK does not provide dedicated functions for sending PUT and PATCH requests to endpoints in Splunk. These operations were only possible using the generic request method, which had issues correctly formatting a body payload, especially for form-encoded data.

This change introduces helper functions for PUT and POST requests, along with a new _prepare_request_body_and_url function to streamline body and URL preparation logic. This ensures consistency, reduces redundancy, and resolves issues with incorrect payload formatting when making these requests.

Changes

  • Added a _prepare_request_body_and_url helper function to handle body preparation and URL encoding for POST and PUT requests.
  • Added put() and updated post() methods to leverage the helper function.
  • Ensured proper handling of Content-Type headers for form-encoded data.

Benefits

  • Simplifies making PUT and PATCH requests directly without needing the generic request method.
  • Fixes body formatting issues, ensuring payloads are correctly encoded.

@Ickerday
Copy link
Collaborator

Ickerday commented Aug 21, 2025

Dismissed as stale. Please tell us if the issue persists!

@Ickerday Ickerday closed this Aug 21, 2025
@seiimonn
Copy link
Author

This is still very much sought after by my team. Let me know if you need anything for this to be merged.

@Ickerday
Copy link
Collaborator

Ickerday commented Sep 9, 2025

Thanks @seiimonn, we'll take a look and get back to you!

@Ickerday Ickerday reopened this Sep 9, 2025
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