Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post Receiver: JSON Payload is not expanded #92

Closed
christianTF opened this issue Oct 22, 2021 · 1 comment
Closed

Post Receiver: JSON Payload is not expanded #92

christianTF opened this issue Oct 22, 2021 · 1 comment
Labels
bug Something isn't working Must Have A Must Have feature wontfix This will not be worked on

Comments

@christianTF
Copy link
Owner

christianTF commented Oct 22, 2021

The code checks for json and inserts the plain json into a json string.
As the script. itself wraps the content into a json, the plugin only expands the outside json, but not the json wrapped into a string.

The json payload needs to be parsed in the php script and added as object to the json sent to the Gateway.

image

@christianTF christianTF added bug Something isn't working Must Have A Must Have feature wontfix This will not be worked on labels Oct 22, 2021
@christianTF
Copy link
Owner Author

The function of receive.php was correctly - json data are expanded as expected.

The special issue arised with the PLEX webhook, that does not send application/json but multipart/form-data, and submits a file (picture) as well as a POST form, where a field is called payload, that included the json.

Therefore, the script did not see a json content (as it is multipart content), and the post variable payload is sent as string to the gateway.

Although time consuming, I now also check the post variables if there content might be a json, and add parsed json also to post variables.
b324df8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Must Have A Must Have feature wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant