ZF-11797: zend_rest_client doesnt easily allow params with underscores

Issue Type: Improvement Created: 2011-10-05T19:52:33.000+0000 Last Updated: 2011-10-05T19:52:33.000+0000 Status: Open Fix version(s): Reporter: clive darr (osde8info) Assignee: Davey Shafik (davey) Tags: - Zend_Rest_Client

Related issues: Attachments:


zend_rest_client doesnt easily allow params with underscores so that web service apis that use a "_" in parameter names are harder to call

[code] <?php

require 'secret.php';

set_include_path(get_include_path() . PATH_SEPARATOR . $myincpath);

require_once 'Zend/Loader/Autoloader.php';


$url="https://$"; $path = "/api/v1/$key1/$key2/Customer";

// FAILS // $client = new Zend_Rest_Client($url.$path); // V1 // $result = $client->token($token); // V2 // $result = $client->token($token); // $result = $client->get();

// WORKAROUND $client = new Zend_Rest_Client($url.$path); $result = $client->restGet("/api/v1/$key1/$key2/Customer", array('token'=>$token));

var_dump($result); [/code]

V1 ERROR [code] ["code"]=> string(3) "400" ["description"]=> string(10) "BadRequest" ["message"]=> string(35) "The URI is not valid: Missing token" [/code]

V2 ERROR [code] ["code"]=> string(3) "400" ["description"]=> string(11) "Bad Request" ["message"]=> string(131) "One or more fields are invalid; Unused Field Name (ID): method (); Unused Field Name (ID): arg1 (); Unused Field Name (ID): rest ()" [/code]


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.