-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Send with json data type #49
Comments
Hey @amanformuli!
Thank you :)
I guess you mean something like |
Hi Kevin, Indeed I asked for such method with only one thing: is it possible to keep the $data type as an array so that both the headers and body of the message is passed. If the send method does not do anything with the headers, then string $data would be fine. Thanks |
I will need to use the transport's configured serializer to decode the message - this does indeed require an array (I thought it was a string) so yes, |
BTW, can you describe your use case for this? I don't think it's invalid, I'd like to describe why you'd do this in the docs for this feature. |
Actually I am using symfony serializer(configured to my symfony messenger) and wanted to test the message with json format instead of Object class. |
Got it, would it be valuable to for |
Yeah that is also fine to accept a json string. |
Hi All,
First of all I appreciate your work. Secondly, is it possible to add a separate public method(in Zenstruck\Messenger\Test\Transport\TestTransport) to send with deserialized data so that a JSON data type is passed as parameter?
{
'headers' => [
'type' => 'Class'
],
'body' => '{"serialized":"data}'
}
Thanks
The text was updated successfully, but these errors were encountered: