vendredi 7 juin 2019

POST request with Guzzle to another site

I have a laravel application and I want to send(POST) some value from a form to another domain for processing. However, whenever I attempt to do so, I get 405 error. Any help, please.

My guzzle fucntion:

    $http = new Client();
        $response = $http->post('https://pay.mysite.com', [
            'form_params' => [
                'amnt' =>  75
            ],
        ]);

     echo $response->getStatusCode();

I simply want to transfer the value to my other domain and process.



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2QU8R6B
via IFTTT

Aucun commentaire:

Enregistrer un commentaire