Articles Tagged 'GET'

Very short snippet: NSConnection POST with parameters

che in modalità POST . The object NSMutableURLRequest can be used in either GET mode in POST . . The parameters, however, must be formatted as if they were in GET , ie in the sequence nome_campo1=valore1&nome_campo2=valore2&... . Here's a useful snippet to simplify the construction of fields:

Continued ...

Very short trick: proxy RSS with SimplePie

If you use Flash or Ajax to read RSS feeds from other domains, you need to equip yourself with a proxy (tunneling) because of the protections imposed by both technologies (see tunneling and proxy servers for Ajax and beyond ). If your site or blog is already SimplePie , you can write a simple proxy like this:

Continued ...

Google AJAX Language API tutorial on the operation

I respond with this post, at the request of Andrea on how to insert the translator of Google in your web. There are several ways to take advantage of machine translation services available from Google and beyond. We can use plugins written by others, a simple JavaScript script from Google itself or mixed learning to use the API, ie a set of callable functions - as we shall see - in various ways.

Plugins

I will not dwell on this solution, as I think is not really relevant to the request of Andrew , if I understood well. Furthermore, it is essentially a solution valid only for the blog and not to use custom and generic. I can only point out to users by WordPress , Global Translator , perhaps the most simple, practical and popular plugins of this type.

Pre script by Google

The easiest way to translate your website or your blog is to add a simple JavaScript script provided by Google. Just go to the site translate.google.com tab and click on 'Tools'. From this page you can preset the translation functions or leave the default. The script is very simple:

1

and as a result we obtain:

Google Translate

Continued ...

Read the parameters of a movie in Actionscript 3.0

With Flash CS3 has changed the way to read the parameters passed to a movie, or as params that as GET parameters. In previous versions of Flash it is a parameter was available as a variable directly in the first frame. Now, fortunately, we have an object that handles parameter passing, and not only: LoaderInfo .

Continued ...

Flash CS3: communicating with a Web Server

ActionScript 3.0 introduces a number of formidable tools of communication, some totally new, some revised and improved from previous versions of ActionScript. We begin to see how it changes the way you interact with a Web Server in the case of a simple communication between Flash and a PHP page with the XML response. First of all, the object XML does not exist anymore! ActionScript 3.0 introduced new classes have been, some of which are dedicated to the "backward compatibility".

Note: The XML class (along with related classes) from ActionScript 2.0 have been renamed XMLDocument and moved to the flash.xml package. It is included in ActionScript 3.0 to ensure compatibility with previous versions.

usando il metodo sendAndLoad() dell'oggetto LoadVars (vedi: Flash: LoadVars e XML per inviare dati in POST ). In ActionScript 2.0 communication with a Web Server was often solved by using the combination of objects LoadVars and XML, using the method sendAndLoad() object LoadVars (see: Flash: LoadVars and XML to send data in POST ). Now things are changing, but you just get used to new names and objects. As indicated in the manual, in fact:

Continued ...

RESTTest: useful extension for FireFox

RESTTest Here is an interesting extension for Firefox ( 2.0.0.9 patch released today ) written by Kris Zyp. RESTTest allows for send and receive check to a URL using the REST protocol, choosing between the canonical methods GET or POST (possibly customized) .
RESTTest can be used to test the XmlHttpRequest object and then to test applications that use Ajax. We can then quickly and easily simulate XHR requests and responses.
This extension is designed specifically for working with REST resources and supports all HTTP methods.
In the field POST / PUT can enter all the parameters that we are sending our test, the standard syntax:

variable1 = value1 & variable2 = value2 &[...] variable n = n value

This extension is also useful in testing the RSS feeds of a site or in the analysis of paramteri any RPC service.

Continued ...

Flash: XML and LoadVars to send data in POST

Here is a great way to send POST data to a Web Server. We will use two objects: a LoadVars object to send and to receive an XML object (in case we expect a return formatted XML document). Use the LoadVars object in Flash is useful for creating run-time properties that will be seen as POST variables for both the ability to specify the delivery method: POST or GET.

First of all we create the LoadVars object that will be used to ship:

1
LoadVars = new LoadVars ( ) ; var s_lv: LoadVars = new LoadVars ();

To this we add the POST variables in a very simple:

1
2
; s_lv. title = "Hello";
; s_lv. subtitle = "Hello World";

Prepare the object that receives the response from the Web Server (in stdout) - if you just make a PHP echo:

1
2
XML = new XML ( ) ; var r_xml: XML = new XML ();
= true ; r_xml. ignoreWhite = true;

At this point we can do is send:

1
"http://miodominio.com/miapagina.php" , r_xml , "POST" ) ; s_lv. sendAndLoad ("http://miodominio.com/miapagina.php" r_xml, "POST");

The sendAndLoad () method of the LoadVars object is very ultile as it allows you to specify the object return (in this case our XML object r_xml) and the shipping method (in our case POST).
Finally just put on hold:

1
2
3
4
5
( success : Boolean ) { r_xml. onLoad = function (success: Boolean ) {
success ) { if (success) {
/ / Processing results
}
};

Continued ...


Stop SOPA