LoginSignup
0
0

More than 3 years have passed since last update.

guzzleでHttp通信をするときにcurlでいう--noproxyオプションを使用する

Posted at

requestを呼ぶときに

'proxy' => ''

をoptionsに指定すればOK。

$client = new \GuzzleHttp\Client();
$method = 'POST';
$url= 'http://url.com';
$options = [
    'form_params' => [
        'param1' => 'AAAAA',
        'param2' => 'BBBB',
        'param3' => 'CCCC',
    ],
    'proxy' => ''
];
$response = $client->request($method, $url, $options);
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0