ibmresilient / resilient-python-api

Python Library for the IBM SOAR REST API, a Python SDK for developing Apps for IBM SOAR and more...
https://ibm.biz/soar-python-docs
MIT License
39 stars 28 forks source link

Added headers to functions #11

Closed teranpeterson closed 2 years ago

teranpeterson commented 4 years ago

Adds header=None as an option to all python requests. Passes this value to make_headers.

Description

Changed every request call in the co3 and co3base function to allow users to pass in a dictionary of header values. These values are passed to the make_headers function as additional_headers where they are combined with the co3_context_token into a single dictionary.

Motivation and Context

Allows users to pass in headers. Specific need that prompted this was setting the handle_format. Fixes #10

How Has This Been Tested?

Tested locally with our version of Resilient. No new tests added because minimal changes made and functions already tested.

Checklist:

Signed-off-by: DCO 1.1 Signed-off-by: Teran Peterson teranpeterson@outlook.com

sj-curtin commented 2 years ago

Hey, @terandev - real sorry for the late response - we are finally getting around to addressing these PRs

Any changes to our resilient library has to be rigorously tested as there is a lot of code out there that depends on it

We think what you are trying to do is possible without any modifications to our library by just updating the URI of the request:

image