Ask Your Question
0

Openstack REST API [closed]

asked 2014-07-21 04:52:35 -0500

dinar agustin gravatar image

why I can't get any respones ? here my get image function, when I call the function, it returns nothing

public function getImage() {

    $url = 'http://10.125.3.18:9292/v2/images';

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPGET, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $this->authToken());

    $response = curl_exec($ch);
    curl_close($ch);

    $result = json_decode($response);
    return $result;
}
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by smaffulli
close date 2014-07-21 10:51:47.619980

Comments

are you getting any error? check whether you are getting through cli first.

SGPJ gravatar imageSGPJ ( 2014-07-21 05:38:23 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-07-21 07:13:25 -0500

dinar agustin gravatar image

updated 2014-07-21 10:52:38 -0500

smaffulli gravatar image

Actually, now I already found the problem, the token expired.

edit flag offensive delete link more

Comments

Search this site and read the documentation before posting new questions.

smaffulli gravatar imagesmaffulli ( 2014-07-21 10:52:26 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-07-21 04:52:35 -0500

Seen: 82 times

Last updated: Jul 21 '14