How to send PUT HTTP Request in Flex

后端 未结 3 1844
慢半拍i
慢半拍i 2020-12-16 08:37

I want to send HTTP PUT Request on one URL to update that content of XML via using API.

URL is like this: https://domainname.com/someurls/id.xml

I want to up

3条回答
  •  天命终不由人
    2020-12-16 09:09

    While Mitul's response did work for me as well, I was able to get PUT and DELETE requests working by doing the following.

    var urlLoader:URLLoader = new URLLoader();
                var urlString:String = "https://www.google.com/arbitraryUrl.json";
                var urlRequest:URLRequest = new URLRequest(urlString);
                urlRequest.method = URLRequestMethod.POST;
    
                var variables:URLVariables = new URLVariables();
                variables._method = "DELETE";
                urlRequest.data = variables;
    
                urlLoader.load(urlRequest); 
    

    So same concept really. Different way of going about it. Hope this helps some people.

提交回复
热议问题