Prev | Current Page 771 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

In reality, the communication is not constrained to the XML format and
can actually use any text format such as JavaScript Object Notation ( JSON) or other custom text formats.
415
Chapter 14: More Interactive Content with JavaScript
Removing the Myths Around AJAX Complexity
Developers that have never used AJAX may fear its use as painful and indeed it can be on some
platforms; that is not the case in haXe, which has been built with communication in mind since day one.
The JavaScript library provides a class XMLHttpRequest that is a low - level abstraction over the
communication object implemented in the different browsers. Although it is possible to work using this
class, it is not the easiest and most effective way. A better choice is to use the haxe.Http class that is a
cross - platform implementation available for every supported platform (Table 14.4).
Table 14-4
haxe.Http Public Field Description
function setHeader( header:String, value:
String ) : Void
Sets a value in the communication header.


Pages:
759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783