package body MSHTML.IHTMLXMLHttpRequest_Object is

   function Get_readyState
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLXMLHttpRequest_Get_readyState);
   end Get_readyState;

   function Get_responseBody
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLXMLHttpRequest_Get_responseBody);
   end Get_responseBody;

   function Get_responseText
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLXMLHttpRequest_Get_responseText);
   end Get_responseText;

   function Get_responseXML
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLXMLHttpRequest_Get_responseXML);
   end Get_responseXML;

   function Get_status
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLXMLHttpRequest_Get_status);
   end Get_status;

   function Get_statusText
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLXMLHttpRequest_Get_statusText);
   end Get_statusText;

   procedure Put_onreadystatechange
     (This : IHTMLXMLHttpRequest_Type;
      P1   : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      Put
        (This,
         IHTMLXMLHttpRequest_Put_onreadystatechange,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => P1),
         Free);
   end Put_onreadystatechange;

   function Get_onreadystatechange
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLXMLHttpRequest_Get_onreadystatechange);
   end Get_onreadystatechange;

   procedure uabort
     (This : IHTMLXMLHttpRequest_Type)
   is
   begin
      Invoke (This, IHTMLXMLHttpRequest_uabort);
   end uabort;

   procedure open
     (This        : IHTMLXMLHttpRequest_Type;
      bstrMethod  : GNATCOM.Types.VARIANT;
      bstrURL     : GNATCOM.Types.VARIANT;
      varAsync    : GNATCOM.Types.VARIANT;
      varUser     : GNATCOM.Types.VARIANT
        := GNATCOM.Types.VARIANT_MISSING;
      varPassword : GNATCOM.Types.VARIANT
        := GNATCOM.Types.VARIANT_MISSING;
      Free        : Boolean := True)
   is
   begin
      Invoke
        (This,
         IHTMLXMLHttpRequest_open,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => varPassword,
          2 => varUser,
          3 => varAsync,
          4 => bstrURL,
          5 => bstrMethod),
         Free);
   end open;

   procedure send
     (This    : IHTMLXMLHttpRequest_Type;
      varBody : GNATCOM.Types.VARIANT
        := GNATCOM.Types.VARIANT_MISSING;
      Free    : Boolean := True)
   is
   begin
      Invoke
        (This,
         IHTMLXMLHttpRequest_send,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => varBody),
         Free);
   end send;

   function getAllResponseHeaders
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke (This, IHTMLXMLHttpRequest_getAllResponseHeaders);
   end getAllResponseHeaders;

   function getResponseHeader
     (This       : IHTMLXMLHttpRequest_Type;
      bstrHeader : GNATCOM.Types.VARIANT;
      Free       : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke
        (This,
         IHTMLXMLHttpRequest_getResponseHeader,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => bstrHeader),
         Free);
   end getResponseHeader;

   procedure setRequestHeader
     (This       : IHTMLXMLHttpRequest_Type;
      bstrHeader : GNATCOM.Types.VARIANT;
      bstrValue  : GNATCOM.Types.VARIANT;
      Free       : Boolean := True)
   is
   begin
      Invoke
        (This,
         IHTMLXMLHttpRequest_setRequestHeader,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => bstrValue,
          2 => bstrHeader),
         Free);
   end setRequestHeader;

end MSHTML.IHTMLXMLHttpRequest_Object;

