Closed ahmadfathihadi closed 12 years ago
Current version of Restler (v2.07) supports the extensions only at the end of the URL.
For example
http://localhost/api/v1/index.php/text/iseng/ok/ok.xml
Will work
Since you asked, I will release an update, where the scenarios you described will work as well :)
unfortunately I'm still get the same issue :(
http://localhost/api/v1/index.php/text/iseng/ok/budi+%26+anto.json
will work
http://localhost/api/v1/index.php/text/iseng/ok/budi+%26+anto.xml
won't work
Thanks :)
i got the problem. is in your xmlformat.php
i do some following modification :
<?php
public function encode($data, $human_readable=true){
//return $this->toXML( object_to_array($data, false), XmlFormat::$root_name, $human_readable);
if(is_array($data)){
$xml = new SimpleXMLElement('<root/>');
array_walk_recursive($data, array ($xml, 'addChild'));
return $xml->asXML();
} else {
return "<result>$data</result>";
}
}
hope this can help :)
I understood the new problem and found the solution too! for better clarity I will file an issue on that and close it with the next update :)
Hi Arul
when i call
http://localhost/api/v1/index.php/text/iseng.xml?api_key=ok&text=ok
it will return an xml formatbut why when i call
http://localhost/api/v1/index.php/text/iseng.xml/api_key=ok/text=ok
return is in Json Format ?It's same if i call
http://localhost/api/v1/index.php/text/iseng.xml/ok/ok
the return is in json format
I also find that that your xml format have an issue when handle an urlencode
won't give any result. but
is working fine
Thanks