Laravel 4 make post request from controller to external url with data

后端 未结 3 1156
一向
一向 2021-01-04 11:03

I am looking for a way to make a post request from a controller to an external url. The data being posted is a php array. The url to recieve is an ecommerce API in an extern

3条回答
  •  甜味超标
    2021-01-04 11:22

    Either use CURL the way you've been trying, or check this thread for a brief answer on doing it with the Guzzle http client. Guzzle seems to be the preferred client for use with Laravel...

    Call external API function from controller, LARAVEL 4

提交回复
热议问题