Skip to content

Custom-Header-Support#20

Open
harshit777 wants to merge 1 commit intoIBM:masterfrom
harshit777:Custom-Header
Open

Custom-Header-Support#20
harshit777 wants to merge 1 commit intoIBM:masterfrom
harshit777:Custom-Header

Conversation

@harshit777
Copy link
Copy Markdown

@harshit777 harshit777 commented Dec 20, 2022

Reference to the Issue

Signed-off-by: Harshit Gupta <harshitgupta@Harshits-MacBook-Pro.local>
@harshit777
Copy link
Copy Markdown
Author

harshit777 commented Dec 20, 2022

Code and Evidence

  1. Client Config Call
    kp = redstone.service("KeyProtect",
        credentials=tm,
        region=region_name,
        service_instance_id=service_id,
        endpoint_url= "",
        headers = {
            "Custom-Header" : "Custom-value-Client",
        }
    )

Screen Shot 2022-12-20 at 12 33 02 PM

  1. Per API Call
kp.session.headers["Custom-Header"] = "Cuatom-Value-API"
key = kp.create_key(name="MyTestKey")
kp.session.headers["Custom-Header"] = None
print(kp.get(key.get('id')))

Screen Shot 2022-12-20 at 12 32 27 PM

Copy link
Copy Markdown
Member

@dinesh-venkatraman-g dinesh-venkatraman-g left a comment

Choose a reason for hiding this comment

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

lgtm

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