Flex JS import files

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Flex JS import files

alina
Unable to import these files in vscode  in .mxml file

 

import org.apache.http.HttpResponse;

import org.apache.http.NameValuePair;

import org.apache.http.client.HttpClient;

import org.apache.http.client.entity.UrlEncodedFormEntity;

import org.apache.http.client.methods.HttpGet;

import org.apache.http.client.methods.HttpPost;

import org.apache.http.impl.client.DefaultHttpClient;

import org.apache.http.message.BasicNameValuePair;

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Flex JS import files

piotrz
Hi Alina,

Could you provide a bit more information.
What are you trying to do? Please describe.

Thanks,
Piotr
Apache Flex PMC
piotrzarzycki21@gmail.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Flex JS import files

alina

<fx:Script>
       
<![CDATA[
			import models.ProductsModel;
			import org.apache.flex.events.MouseEvent; //automatic imports
 			import org.apache.flex.html.Alert;
			
		  	 import org.apache.http.HttpResponse;
			import org.apache.http.NameValuePair;
			import org.apache.http.client.HttpClient;
			import org.apache.http.client.entity.UrlEncodedFormEntity;
			import org.apache.http.client.methods.HttpGet;
			import org.apache.http.client.methods.HttpPost;
			import org.apache.http.impl.client.DefaultHttpClient;
			import org.apache.http.message.BasicNameValuePair;  
		
 
public  function onInitComplete():void{

var url:String = "http://192.168.0.1/abc....";

	var	 client:HttpClient = new DefaultHttpClient();
		var request:HttpGet = new HttpGet(url);

	

	HttpResponse response = client.execute(request);
 }
]]>



    </fx:Script>
Actually I want to Access my Server Side methods using httpget and  httpresponse ,  added libraries in libs folder already and set asconfig.json as :
  "compilerOptions": {
        "targets": [
            "JSFlex"
        ],
         "library-path": [
                        "libs"
                ],
        "source-map": true,
        "debug": true
    }
Loading...