XMLHttpRequest.hx 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright (C)2005-2015 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from mozilla/XMLHttpRequest.webidl line 58:0. Do not edit!
  23. package js.html;
  24. @:native("XMLHttpRequest")
  25. extern class XMLHttpRequest extends XMLHttpRequestEventTarget
  26. {
  27. static inline var UNSENT : Int = 0;
  28. static inline var OPENED : Int = 1;
  29. static inline var HEADERS_RECEIVED : Int = 2;
  30. static inline var LOADING : Int = 3;
  31. static inline var DONE : Int = 4;
  32. var onreadystatechange : haxe.Constraints.Function;
  33. var readyState(default,null) : Int;
  34. var timeout : Int;
  35. var withCredentials : Bool;
  36. var upload(default,null) : XMLHttpRequestUpload;
  37. var responseURL(default,null) : String;
  38. var status(default,null) : Int;
  39. var statusText(default,null) : String;
  40. var responseType : XMLHttpRequestResponseType;
  41. var response(default,null) : Dynamic;
  42. var responseText(default,null) : String;
  43. var responseXML(default,null) : HTMLDocument;
  44. /** @throws DOMError */
  45. @:overload( function( ?params : Dynamic/*MISSING MozXMLHttpRequestParameters*/ ) : Void {} )
  46. function new( ignored : String ) : Void;
  47. /** @throws DOMError */
  48. @:overload( function( method : String, url : String ) : Void {} )
  49. function open( method : String, url : String, async : Bool, ?user : String, ?password : String ) : Void;
  50. /** @throws DOMError */
  51. function setRequestHeader( header : String, value : String ) : Void;
  52. /** @throws DOMError */
  53. @:overload( function() : Void {} )
  54. @:overload( function( data : ArrayBuffer ) : Void {} )
  55. @:overload( function( data : ArrayBufferView ) : Void {} )
  56. @:overload( function( data : Blob ) : Void {} )
  57. @:overload( function( data : HTMLDocument ) : Void {} )
  58. @:overload( function( data : String ) : Void {} )
  59. @:overload( function( data : FormData ) : Void {} )
  60. function send( data : Dynamic/*MISSING InputStream*/ ) : Void;
  61. /** @throws DOMError */
  62. function abort() : Void;
  63. /** @throws DOMError */
  64. function getResponseHeader( header : String ) : String;
  65. /** @throws DOMError */
  66. function getAllResponseHeaders() : String;
  67. /** @throws DOMError */
  68. function overrideMimeType( mime : String ) : Void;
  69. /** @throws DOMError */
  70. function sendAsBinary( body : String ) : Void;
  71. }