Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Matthew Weier O’Phinney: Apigility: Using RPC with HAL

Matthew Weier O’Phinney: Apigility: Using RPC with HAL

Matthew Weier O’Phinney has a new post sharing some of the details about using RPC and HAL in the Apigility API tool from Zend. HAL stands for “Hypermedia Access Language” and basically provides a way to define objects in an API and what they relate to.

A few days ago, we released our first beta of Apigility. We’ve started our documentation effort now, and one question has arisen a few times that I want to address: How can you use Hypermedia Application Language (HAL) in RPC services? Hypermedia Application Language is an IETF proposal for how to represent resources and their relations within APIs. Technically, it provides two mediatypes, application/hal+json and application/hal+xml; however, Apigility only provides the JSON variant.

He introduces some of the basics of HAL and includes an example of JSON output showing metadata about the current object such as a full link to the resource. He also includes an example of the “embedded” data, additional related data, other objects, with their own structure and links. He also briefly mentions what RPC is and how it works before getting into how to set up the endpoints in your Apigility API with the help of “ContentNegotiation” functionality.

Link: http://mwop.net/blog/2014-03-26-apigility-rpc-with-hal.html
Source: http://www.phpdeveloper.org/news/20970

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Posted Marzec 29th, 2014 in WEB and PHP Development.

Leave a response: