Closed bpastukh closed 1 year ago
Hey @bpastukh,
I think this should be considered a bug. I think what you want in your configuration is:
ping_on_success:
options:
json:
text: success
headers:
'Content-Type': application/json
For this to work, I think we need to change:
- ->scalarPrototype()->end()
+ ->variablePrototype()->end()
Could you try this in your local project and see if it works?
- ->scalarPrototype()->end()
+ ->variablePrototype()->end()
yes, it works, thank you!
btw, header 'Content-Type': application/json
is extra if we use json
option (it is set in HttpClientTrait.php:80) . So this config is correct:
ping_on_success:
options:
json:
text: success
btw, header 'Content-Type': application/json is extra if we use json option (it is set in HttpClientTrait.php:80) .
Oh yeah.
yes, it works, thank you!
Would you be up for creating a PR?
Hello! I'm not sure I understood how I should configure ping extension options. According to HttpClientInterface::OPTIONS_DEFAULTS, it's
But in src/DependencyInjection/Configuration.php:331 options is configured as an array of scalar
So I tried this way:
But HTTP client converts " to \u0022. So I tried to use body option + content-type header
And now I have problems with headers: In HttpClientTrait.php line 235:
So what's the correct way to configure ping options in yaml format?