vendredi 23 septembre 2016

Can I post json POST request as plain text when testing Laravel app?

I have a raw request payload that I would like to use for testing JSON webhook. Is there any way I can use it? I have tried to JSON decode it:

$this->call('POST', '/api/webhook', json_decode(File::get(storage_path('SampleRequest.json')), true));

Aucun commentaire:

Enregistrer un commentaire