PlantLink

免费
通过 danwiding | 已更新 1ヶ月前 | Other
Health Check

N/A

返回所有讨论

php api

Rapid account: SEYDOUX
SEYDOUX
9年前

I start, I have written the follwing code in php:


require_once ‘unirest/src/Unirest.php’;

$response = Unirest\Request::get(“https://plantlink.p.mashape.com/plants”,
array(
“Authorization” => “Basic c2V5ZG91eEBicnlvZmxvci5jb206aGIyaHJqdjY=”,
“X-Mashape-Key” => “9H7UqKtpqymshIJHlXGU6a4Expyjp1O7B3AjsnavRvcEUrLOFL”,
“Accept” => “application/json”
)
);

echo $response->code; // HTTP Status code

//echo $response->raw_body; // Unparsed body


I get $response->code = 401 which make we think that I am not properly authenticated.

Can you indicate the complete code to make it work ?

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论