Loading ...
Sorry, an error occurred while loading the content.
 

Re: SyncRequest

Expand Messages
  • Simone
    ... I implemented this small method to support a syncRequest... My question is: in the doc, many comments says that his method is called by asyncRequest and
    Message 1 of 2 , Mar 21, 2006
      --- In ydn-javascript@yahoogroups.com, "Simone" <simone@...> wrote:
      >
      > Is it possibile to make SyncRequests using this connection library?
      >
      > in XmlHTTPRequest you can call the open method with false, and u gett
      > sync request...
      > but how to do it with this lib?
      >

      I implemented this small method to support a syncRequest...
      My question is:
      in the doc, many comments says that "his method is called by
      asyncRequest and syncRequest ...", but where is the syncRequest method?

      /**
      * Method for initiating a synchronous request via the XHR object.
      * @public
      * @param {string} method HTTP transaction method
      * @param {string} uri Fully qualified path of resource
      * @return {object} Returns the connection object
      */
      syncRequest:function(method, uri)
      {
      var errorObj;
      var o = this.getConnectionObject();

      if(!o){
      return null;
      }
      else{
      var oConn = this;

      o.conn.open(method, uri, false);

      o.conn.send(null);

      return o.conn;
      }
      },
    Your message has been successfully submitted and would be delivered to recipients shortly.