Nodge / yii-eauth

EAuth extension allows to authenticate users by the OpenID, OAuth 1.0 and OAuth 2.0 providers.
BSD 2-Clause "Simplified" License
327 stars 114 forks source link

Fix post request #106

Closed fullpipe closed 5 years ago

Nodge commented 9 years ago

According to cURL module documentation for CURLOPT_POSTFIELDS option:

This parameter can either be passed as a urlencoded string like 'para1=val1&para2=val2&...' or as an array with the field name as key and field data as value. If value is an array, the Content-Type header will be set to multipart/form-data.

So, why should we encode data manually?

fullpipe commented 9 years ago

Epic fail, I forget about http_build_query. )

Because of curl version, I think. Same problem and no answer. And passing post data as array, requires headers. But they are disabled curl_setopt($ch, CURLOPT_HEADER, 0);