Skip to content

Trying to send none-json data with triggers fails due to Guzzle

Guzzle's Client::post requires the second argument to be an array. This raises an Exception in case of non-json payloads:

FatalThrowableError
Argument 2 passed to GuzzleHttp\Client::post() must be of the type array, string given, called in /home/messerschmidt/Projects/lou-server/app/Trigger.php on line 27 

Reproduce:

  1. Create a POST-Trigger with payload fdskgesrw and url http://doesntexist.dfsafjdskgfds.fdsjfdsfdsg.
  2. Run the trigger.

TODO:

  1. Find out, how to send arbitrary POST-Requests with Guzzle.
  2. Implement changes in app\Trigger.php::run
Edited by Maik Messerschmidt