Skip to content

Parse webhook headers json from cfg files - #25

Open
krzmaz wants to merge 1 commit into
suchmememanyskill:mainfrom
krzmaz:main
Open

krzmaz wants to merge 1 commit into
suchmememanyskill:mainfrom
krzmaz:main

Conversation

@krzmaz

@krzmaz krzmaz commented Aug 23, 2026

Copy link
Copy Markdown

[Problem]
Cfg files don't support key-value maps and the requests library expects a dict with the headers. The current implementation blindly passes what was found under the headers key in config, which in the case of a cfg/ini config will be a string causing an exception to be raised.

[Solution]
Check if the value found under the headers key is a string and assume it's a json if so.

[Problem]
Cfg files don't support key-value maps and the requests library expects
a dict with the headers. The current implementation blindly passes what
was found under the headers key in config, which in the case of a
cfg/ini config will be a string causing an exception to be raised.

[Solution]
Check if the value found under the headers key is a string and assume
it's a json if so.
@krzmaz

krzmaz commented Sep 1, 2026

Copy link
Copy Markdown
Author

@suchmememanyskill sorry for the direct ping, but this is a small change and I would love to have it in the next release of the Snapmaker u1 extended firmware 🤞🏻
Could you take a look and let me know what you think?

@suchmememanyskill

Copy link
Copy Markdown
Owner

Currently on holiday, cannot look now

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