Skip to content

Instantly share code, notes, and snippets.

@hubgit
Created January 7, 2015 22:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hubgit/d330722862ed45dfcfde to your computer and use it in GitHub Desktop.
SOAP vs REST
<?php
// SOAP (parameters as inputs to a function)
$client = new SoapClient('http://example.com/soap?wsdl', true);
$result = $client->call('getPeople', array('name' => 'Foo'));
// REST (parameters as filters on a collection)
$resource = new Resource('http://example.com/people/', array('name' => 'Foo'));
$result = $resource->get('json');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment