Skip to content

Super simple REST Client for consuming REST-ful Web Services (see README for usage examples)

Notifications You must be signed in to change notification settings

kaylarose/KMHttp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

<html>
	<body>
		<h2>New Style Pretty Urls</h2>
		<pre>
$gh = KMHttp::at('http://github.com/api/v2/json');
$gh_data = $gh->get('/user/show/kaylarose');
echo ($gh_data) ? $gh_data : $gh->last_status();
		</pre>
		<h2>Old Style Ugly Urls</h2>
		<h5>w. Pretty Params</h5>
		<pre>
$yh = KMHttp::at('http://api.local.yahoo.com/MapsService/V1');
$params = array(
	'appid' 	=> 'XXXXXXXXX', //This is a real API key!?
	'street'	=> '701 First Street',
	'city'		=> 'Sunnyvale',
	'state'		=> 'CA'
);
$y_data = $yh->get('/geocode', $params);
		</pre>
		<h5>via Direct URL</h5>
		<pre>
$yh = KMHttp::at('http://api.local.yahoo.com/MapsService/V1');
$y_data2 = $yh->get('/geocode?appid=XXXXXXXXX&street=701+First+Street&city=Sunnyvale&state=CA');
		</pre>
	</body>
</html>

About

Super simple REST Client for consuming REST-ful Web Services (see README for usage examples)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages