teepluss / laravel-hmvc

HMVC is a tool for making internal request.
76 stars 20 forks source link

Issues sending a json request #19

Open phazei opened 9 years ago

phazei commented 9 years ago

I'm using L4.2.

It's currently quite difficult to send a json request. The invokeRemote method requires that the data parameter be an array, but the only way to manually set the body in guzzle3 is to send that parameter as a string.

That's changed in guzzle5 as it has better support methods for json, where I can just make the array key 'json' with an array body and it should convert it I believe.

So it would be great if either this module allowed a string as the data, or it was upgraded to use guzzle 5. Otherwise I'm not sure how it could send a json body :/