Re: REST documentation a little light
Here is the correct code.
$req =& new HTTP_Request($url);
$req->setMethod(HTTP_REQUEST_METHOD_POST);
$req->addPostData('method', 'login');
$req->addPostData('input_type', 'json');
$req->addPostData('response_type', 'json');
$json = getJSONobj();
$jsonEncodedData = $json->encode(array('user_auth'=>array('user_name'=>$use r_name,'password'=>md5($user_password), 'version'=>'.01'), 'application_name'=>'TRIPInfo', 'name_value_list' => array()), false);
$req->addPostData('rest_data', $jsonEncodedData);
$req->sendRequest();
$list = $req->getResponseBody();
Try out this one and let me know what u get.
-Samir
|