Answers for "make a post call with Http laravel"

PHP
0

use guzzle http client laravel

public function putGuzzleRequest()

{

    $client = new \GuzzleHttp\Client();

    $url = "http://myexample.com/api/posts/1";

    $myBody['name'] = "Demo";

    $request = $client->put($url,  ['body'=>$myBody]);

    $response = $request->send();



    dd($response);

}
Posted by: Guest on October-08-2020
2

laravel add request

$request->all() + ['index' => 'value'];
Posted by: Guest on January-25-2021

Code answers related to "make a post call with Http laravel"

Browse Popular Code Answers by Language