From 3a0cc3d3bc98dcec20b879e1205f72d971a66233 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 24 Jul 2008 09:20:27 +0000 Subject: Api tweaks refs #149 git-svn-id: https://code.elgg.org/elgg/trunk@1508 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/api.php b/engine/lib/api.php index ca8d559d8..ed77fe162 100644 --- a/engine/lib/api.php +++ b/engine/lib/api.php @@ -761,10 +761,11 @@ $headers = array(); $encoded_params = array(); + $method = strtoupper($method); switch (strtoupper($method)) { case 'GET' : - case 'POST' : $method = strtoupper($method); break; + case 'POST' : break; default: throw new NotImplementedException(sprintf(elgg_echo('NotImplementedException:CallMethodNotImplemented'), $method)); } @@ -847,7 +848,7 @@ * @param string $content_type The content type * @return stdClass The unserialised response object */ - function send_api_post_call($url, array $call, array $keys, $post_data, $content_type = 'application/octet-stream') { return send_api_call($url, $call, 'POST', $post_data, $content_type); } + function send_api_post_call($url, array $call, array $keys, $post_data, $content_type = 'application/octet-stream') { return send_api_call($keys, $url, $call, 'POST', $post_data, $content_type); } /** * Return a key array suitable for the API client using the standard authentication method based on api-keys and secret keys. -- cgit v1.2.3