Join For Free

30+ ways to make REST calls in Node.js, PHP, Python, Rails, Obj-C, .NET, and Java / Android Posted 5 months ago

image

Here’s a list of resources on how to make REST calls in different languages.  (We also have this list of 40+ tutorials on how to create an API in different languages).

If you dabble with one or more of these languages in your different projects, we highly recommend that you check out Unirest.io, an open source lightweight HTTP client library.  It’s goal is to provide a consistent way for developers to make HTTP calls across different languages (node.js, Ruby, PHP, Java, Python, Objective-C, .NET)

If you have suggested additions to the links below, please tweet to @mashape and we’ll add it here!

Node.js

  1. http://stackoverflow.com/a/5643366/1681609 (Apr 2011)
  2. http://stackoverflow.com/a/16155551/1681609 (Apr 2013)
  3. http://rapiddg.com/blog/calling-rest-api-nodejs-script
  4. http://isolasoftware.it/2012/05/28/call-rest-api-with-node-js/ (May 2012)

PHP

  1. http://stackoverflow.com/a/9802854/1681609 (Mar 2012)
  2. http://support.qualityunit.com/061754-How-to-make-REST-calls-in-PHP
  3. http://developer.yahoo.com/php/howto-reqRestPhp.html
  4. https://bcws.brightcloud.com/articles/code_php
  5. https://developer.decibel.net/sample-code-rest-php
  6. http://www.gen-x-design.com/archives/making-restful-requests-in-php/
  7. http://www.lornajane.net/posts/2008/using-curl-and-php-to-talk-to-a-rest-service (Sep 2008)

Javascript

  1. http://stackoverflow.com/a/922121/1681609 (July 2011)
  2. http://developer.yahoo.com/javascript/howto-ajax.html
  3. http://rest.elkstein.org/2008/02/using-rest-in-javascript.html (2008)

Python

  1. http://developer.yahoo.com/python/python-rest.html
  2. http://developer.yahoo.com/python/python-rest.html (Feb 2008)
  3. https://developer.decibel.net/sample-code-rest-python
  4. http://jaimegildesagredo.github.io/2012/12/26/a-python-restful-api-consumer.html (Dec 2012)

Objective-C

  1. http://rajneesh071.blogspot.com/2013/07/how-to-make-rest-api-call-in-objective-c.html (July 2013)
  2. http://stackoverflow.com/a/4651233/1681609 (Dec 2012)
  3. https://www.captechconsulting.com/blog/jack-cox/tutorial-simple-iphone-rest-client (Nov 2009)

Rails

  1. http://stackoverflow.com/a/748657/1681609 (Apr 2009)

ASP.NET Web API / C# / .NET

  1. http://www.asp.net/web-api/overview/web-api-clients/calling-a-web-api-from-a-net-client (July 2012)
  2. http://www.codeproject.com/Tips/497123/How-to-make-REST-requests-with-Csharp (Nov 2012)
  3. https://developer.decibel.net/sample-code-rest-csharp
  4. http://rest.elkstein.org/2008/02/using-rest-in-c-sharp.html (Feb 2008)
  5. http://stackoverflow.com/questions/1842770/consume-rest-api-from-net
  6. http://msdn.microsoft.com/en-us/library/jj819168.aspx
  7. http://blog.anthonybaker.me/2013/05/how-to-consume-json-rest-api-in-net.html (May 2015)
  8. http://developer.yahoo.com/dotnet/howto-rest_cs.html
  9. http://devlicio.us/blogs/derik_whittaker/archive/2009/02/15/getting-data-from-a-rest-service-using-c.aspx (Feb 2009)

Java / Android

  1. http://stackoverflow.com/questions/3913502/restful-call-in-java (Oct 2012)
  2. http://stackoverflow.com/a/3506039/1681609 - Android (Aug 2010)
  3. http://www.javacodegeeks.com/2012/09/simple-rest-client-in-java.html (Sept 2012)
  4. https://bcws.brightcloud.com/articles/code_java
  5. http://stackoverflow.com/a/5769576/1681609 - Android (Apr 2011)
  6. http://timewasted.net/?p=127 (Mar 2010)
  7. https://searchblox.tenderapp.com/kb/indexing/how-do-i-call-the-rest-api-from-java
  8. http://rest.elkstein.org/2008/02/using-rest-in-java.html (Feb 2008)

Also check out these example POST requests in 27+ languages/frameworks.



  1. mashape posted this