You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/12/26 15:31:29 UTC

[royale-docs] branch master updated: adding some HTTPService info

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new b9fa14e  adding some HTTPService info
b9fa14e is described below

commit b9fa14e2ed254b16e7e68873187a79c276bfaf93
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Dec 26 16:31:20 2019 +0100

    adding some HTTPService info
---
 features/loading-external-data/httpservice.md  | 41 +++++++++++++++++++++++++-
 features/loading-external-data/remoteobject.md |  2 +-
 2 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/features/loading-external-data/httpservice.md b/features/loading-external-data/httpservice.md
index 214d3ea..3ec4a23 100644
--- a/features/loading-external-data/httpservice.md
+++ b/features/loading-external-data/httpservice.md
@@ -22,7 +22,46 @@ permalink: /features/loading-external-data/httpservice
 
 # HTTPService
 
-*information coming soon.*
+Loading external data through REST services
 
+You can load external data in Apache Royale using the `HTTPService` class. Use `HTTPService` to make _POST_, _GET_, _PUT_ and _DELETE_ operations for requests on external data for [REST](https://en.wikipedia.org/wiki/Representational_state_transfer){:target='_blank'} services.
 
+## Implementations
 
+In Apache Royale we have two `HTTPService` implementations:
+
+* **MXRoyale**: Is an emulation of the implementation that Flex applications use. It is the best option if you're migrating from Flex since it supports the same API that the Flex framework uses.
+
+* **Network**: Is a newer bead implementation. This is still under development, so you may run into some issues that will need to be resolved.
+
+## Examples
+
+In Apache Royale you can write an `mx:RemoteObject` like this:
+
+```mxml
+<fx:Declarations>
+    	<mx:HTTPService id="srv" useProxy="false" resultFormat="text"
+            result="resultHandler(event)" fault="faultHandler(event)"/>
+</fx:Declarations>
+```
+
+You can write the `Network` implementation like this:
+
+```mxml
+<js:beads>
+    <js:HTTPService id="service">
+        <js:LazyCollection id="collection">
+            <js:inputParser>
+                <js:JSONInputParser />
+            </js:inputParser>
+            <js:itemConverter>
+                <local:StockDataJSONItemConverter />
+            </js:itemConverter> 
+        </js:LazyCollection>
+    </js:HTTPService>
+</js:beads>
+```
+
+## More examples
+
+- [Loading external data through HTTPService](https://royale.apache.org/loading-external-data-through-httpservice/){:target='_blank'} 
diff --git a/features/loading-external-data/remoteobject.md b/features/loading-external-data/remoteobject.md
index 593aee8..ac390dd 100644
--- a/features/loading-external-data/remoteobject.md
+++ b/features/loading-external-data/remoteobject.md
@@ -28,7 +28,7 @@ RemoteObject lets Apache Royale applications make [Remote Procedure Calls (RPCs)
 
 ## Implementations
 
-In Apache Royale we have two RemoteObject implementations:
+In Apache Royale we have two `RemoteObject` implementations:
 
 * **MXRoyale**: Is an emulation of the implementation that Flex applications use. It is the best option if you're migrating from Flex since it supports the same API that the Flex framework uses.