background preloader

REST, SOAP

Facebook Twitter

Slim Framework. Интернет-магазин Chrome - Advanced REST client. Making RESTful Requests in PHP « Gen X Design. How to GET, POST, PUT, & DELETE in PHP APIs have become a very commonplace part of many popular web sites and services… especially REST APIs.

Making RESTful Requests in PHP « Gen X Design

I’ve already discussed how you can roll your own REST API for your PHP apps, but I’ve also received countless requests to go over how to actually make RESTful requests. That’s exactly what we’ll take a look at in this article. Before we dive in, however, I want to make sure you’ve got a basic understanding of how REST APIs work, so if you’re a bit shaky or unfamiliar with the concept, head on over to my previous article on REST and read up (you don’t need to go over the implementation stuff if you don’t want, just read the first part of the article). Seriously, do it… this article is written with the assumption you’re familiar with the concepts of REST. Anyway, without any further delay, let’s take a look at what we’re going to cover… The Basics of a RESTful Request Every REST request consists of essentially the same basic parts:

Create a REST API with PHP « Gen X Design. Your apps never had it so good One of the latest (sort of) crazes sweeping the net is APIs, more specifically those that leverage REST.

Create a REST API with PHP « Gen X Design

It’s really no surprise either, as consuming REST APIs is so incredibly easy… in any language. It’s also incredibly easy to create them as you essentially use nothing more than an HTTP spec that has existed for ages. One of the few things that I give Rails credit for is its well thought-out REST support, both for providing and consuming these APIs (as its been explained by all the Rails fanboys I work with). Seriously, if you’ve never used REST, but you’ve ever had to work with (or worse, create) a SOAP API, or simply opened a WSDL and had your head explode, boy do I have good news for you! So, What on Earth is REST?

Before we get into writing some code, I want to make sure everyone’s got a good understanding of what REST is and how its great for APIs. Requests All APIs need to accept requests. SOAP vs. REST : choisir la bonne architecture web services - Clever Link - Veille - Clever Age. De plus en plus d’entreprises ont besoin de rendre leurs applications accessibles sur le web.

SOAP vs. REST : choisir la bonne architecture web services - Clever Link - Veille - Clever Age

Les motivations sont multiples : élargir l’audience des utilisateurs, vendre des services en ligne, faire communiquer des applications existantes ou supporter une interface de type AJAX. Dans ces conditions, quelle architecture choisir ou concevoir ? Quel format utiliser pour échanger des données sur le web ? Et devrait-on utiliser un protocole applicatif existant ou développer un protocole adapté à nos besoins ? Table des matières Introduction Nous parlons ici de mettre en place un protocole applicatif sur le web pour échanger de l’information avec un grand nombre de clients. Le développement de protocoles applicatifs Rendre ses applications accessibles sur le web consiste à définir un protocole applicatif et un format de données.

Nous avons vu que les motivations des entreprises pour déployer des web services aujourd’hui étaient nombreuses. ★ L'architecture orientée ressource pour faire des services web RESTful, dans rest. How I Explained REST to My Wife. S Blog » Blog Archive » Writing a Simple REST and SOAP Service With PHP. WSF/PHP enables you to write both REST and SOAP services in PHP from a single script.

s Blog » Blog Archive » Writing a Simple REST and SOAP Service With PHP

I have written about how you can expose your Database as a REST and SOAP services in few of my previous posts using the Data Service capability of WSF/PHP. But there can be situations where your service is not based on a Database. For an example it can use results of some calculations, or a mashup calling other services. In that case you will prefer to write the service logic yourself. Here is how you can do it. Lets think we have weather forecast data (may be from another service) and I want to make a web service using it and make it accessible via both REST and SOAP protocols. In our demo service we give forecasts of temperature, humidity and some other parameters for a given date. SOAP request payload as following. <weatherReport><date>{date}</date><parameter>{parameter}</parameter></weatherReport> And REST Request will be like weatherReport/{date}/forecast/{parameter}