PlantLink

GRATUITO
Por danwiding | Atualizado a month ago | Other
Popularidade

0 / 10

Latência

19ms

Nível de serviço

0%

Health Check

N/A

Voltar para todas as discussões

php api

Rapid account: SEYDOUX
SEYDOUX
9 years ago

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 ?

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários