Closed mydesign closed 7 years ago
What you try to achieve? Do you want to set a get- or post- or header param?
i try get
Have you tried:
// GET request with GET params
// http://example.com/?key=value&scondKey=secondValue
$curl = new curl\Curl();
$response = $curl->setGetParams([
'email' => $model-email
])
->get('http://example.com/');
This API need fields[email], from long url:
https://api.unisender.com/ru/api/subscribe?format=json&api_key=KEY&list_ids=134,135&fields[email]=test@example.org&tags=MyTag1,MyTag2&request_ip=12.34.56.78&request_time=2011-01-01&double_optin=0&confirm_ip=34.56.78.90&confirm_time=2011-01-02&overwrite=0
This is not error, but it be feature
// GET request with GET params
// http://example.com/?key=value&scondKey=secondValue
$curl = new curl\Curl();
$response = $curl->setGetParams([
'fields[email]' => $model-email
])
->get('http://example.com/');
Can i set params like?
'fields[email]' => $model->email,