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

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 527ab9a1ce Added execute method for HttpRequestTask
527ab9a1ce is described below

commit 527ab9a1cea74ecdb7f06d4aa82b37e55dcd9526
Author: Harbs <ha...@in-tools.com>
AuthorDate: Sun Aug 13 10:59:56 2023 +0300

    Added execute method for HttpRequestTask
---
 .../royale/org/apache/royale/utils/async/HttpRequestTask.as  | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git 
a/frameworks/projects/Network/src/main/royale/org/apache/royale/utils/async/HttpRequestTask.as
 
b/frameworks/projects/Network/src/main/royale/org/apache/royale/utils/async/HttpRequestTask.as
index 98b7b7abb2..6aca4c6478 100644
--- 
a/frameworks/projects/Network/src/main/royale/org/apache/royale/utils/async/HttpRequestTask.as
+++ 
b/frameworks/projects/Network/src/main/royale/org/apache/royale/utils/async/HttpRequestTask.as
@@ -136,6 +136,16 @@ package org.apache.royale.utils.async
                {
                        fail();
                }
-
+               public static function execute(url:String, callback:Function, 
method:String = HTTPConstants.GET, parameters:Object = null, contentType:String 
= HTTPConstants.FORM_URL_ENCODED, requestHeaders:Array = null):void
+               {
+                       var task:HttpRequestTask = new HttpRequestTask();
+                       task.url = url;
+                       task.contentType = contentType;
+                       task.method = method;
+                       task.requestHeaders = requestHeaders;
+                       task.parameters = parameters;
+                       task.done(callback);
+                       task.run();
+               }
        }
 }
\ No newline at end of file

Reply via email to