Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Updated readme
- Loading branch information
1 parent
9aeff31
commit d87c52e
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,27 @@ | ||
# WiRL | ||
## Delphi RESTful Library | ||
|
||
<a href="http://wirl.delphiblocks.com/">![WiRL Restful Library](http://wirl.delphiblocks.com/assets/images/wirl-300.png)</a> | ||
<a href="http://wirl.delphiblocks.com/"> | ||
<img src="http://wirl.delphiblocks.com/assets/images/wirl-300.png" alt="Delphi RESTful Library" width="200" align="center" /></a> | ||
|
||
**WiRL** was created to simplify RESTful service implementation in Delphi, but more importantly, to enable maximum interoperability with REST client written in other languages and tools. | ||
|
||
WiRL is designed after Java JAX-RS specifications, and tries to be compliant with the 6 REST constraints | ||
|
||
WiRL is a high-level REST framework that exposes plain Delphi objects (PODO) as RESTful web resources by applying [attributes](http://docwiki.embarcadero.com/RADStudio/Seattle/en/Overview_of_Attributes) to these classes. | ||
|
||
```Delphi | ||
[Path('customers')] | ||
TCustomerResource = class | ||
public | ||
[GET] | ||
[Produces('TMediaType.APPLICATION_JSON')] | ||
function SelectCustomers: TCustomerList; | ||
[POST] | ||
[Consumes('TMediaType.APPLICATION_JSON')] | ||
[Produces('TMediaType.APPLICATION_JSON')] | ||
function InsertCustomer(ACustomer: TCustomer): TCustomer; | ||
end; | ||
``` | ||
WiRL has a strong HTTP content negotiation and defines attributes to bind specific URI patterns and HTTP operations to individual methods of your Delphi class. It has parameter injection attributes so that you can easily pull in information from the HTTP request. It has message body readers and writers that allow you to decouple data format marshalling and unmarshalling from your Delphi objects. It has exception mappers that can map an exception to an HTTP response code and message. |