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

Re: DataSource and http headers

Expand Messages
  • stefdev
    ... Sorry but I am inside success callback of a DataSource not of a Connection. If I use oResponse.getResponseHeader Error Console says:
    Message 1 of 6 , Jul 31, 2008
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
      >
      > See:
      >
      > http://developer.yahoo.com/yui/connection/#success
      >
      > either oResponse.getResponseHeader or oResponse.getAllResponseHeaders.
      >
      > Satyam
      >

      Sorry but I am inside success callback of a DataSource not of a
      Connection.
      If I use oResponse.getResponseHeader Error Console says:
      oResponse.getResponseHeader has no properties.

      Stef
    • stefdev
      ... Perhaps I can override doBeforeParseData or doBeforeCallback so that I can access oFullResponse. However I would like to access oFullResponse inside
      Message 2 of 6 , Jul 31, 2008
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "stefdev" <stefdev@...> wrote:
        >
        > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
        > >
        > > See:
        > >
        > > http://developer.yahoo.com/yui/connection/#success
        > >
        > > either oResponse.getResponseHeader or oResponse.getAllResponseHeaders.
        > >
        > > Satyam
        > >
        >
        > Sorry but I am inside success callback of a DataSource not of a
        > Connection.
        > If I use oResponse.getResponseHeader Error Console says:
        > oResponse.getResponseHeader has no properties.
        >
        > Stef
        >

        Perhaps I can override doBeforeParseData or doBeforeCallback
        so that I can access oFullResponse.
        However I would like to access oFullResponse inside
        success callback :)

        Stef
      • Satyam
        I believe oFullResponse is already oResponse.responseText so the headers would have been lost. You might want to listen to responseEvent Satyam ... See:
        Message 3 of 6 , Jul 31, 2008
        • 0 Attachment
          I believe oFullResponse is already oResponse.responseText so the headers would have been lost.  You might want to listen to responseEvent

          Satyam


          stefdev wrote:
          --- In ydn-javascript@yahoogroups.com, "stefdev" <stefdev@...> wrote:
            
          --- In ydn-javascript@yahoogroups.com, Satyam <satyam@> wrote:
              
          See:
          
          http://developer.yahoo.com/yui/connection/#success
          
          either oResponse.getResponseHeader or oResponse.getAllResponseHeaders.
          
          Satyam
          
                
          Sorry but I am inside success callback of a DataSource not of a
          Connection.
          If I use oResponse.getResponseHeader Error Console says:
          oResponse.getResponseHeader has no properties.
          
          Stef
          
              
          Perhaps I can override doBeforeParseData or doBeforeCallback
          so that I can access oFullResponse.
          However I would like to access oFullResponse inside 
          success callback :)
          
          Stef
          
          
          
          ------------------------------------
          
          Yahoo! Groups Links
          
          <*> To visit your group on the web, go to:
              http://groups.yahoo.com/group/ydn-javascript/
          
          <*> Your email settings:
              Individual Email | Traditional
          
          <*> To change settings online go to:
              http://groups.yahoo.com/group/ydn-javascript/join
              (Yahoo! ID required)
          
          <*> To change settings via email:
              mailto:ydn-javascript-digest@yahoogroups.com 
              mailto:ydn-javascript-fullfeatured@yahoogroups.com
          
          <*> To unsubscribe from this group, send an email to:
              ydn-javascript-unsubscribe@yahoogroups.com
          
          <*> Your use of Yahoo! Groups is subject to:
              http://docs.yahoo.com/info/terms/
          
          
          No virus found in this incoming message.
          Checked by AVG - http://www.avg.com 
          Version: 8.0.138 / Virus Database: 270.5.8/1582 - Release Date: 30/07/2008 18:37
          
          
          
            
        • stefdev
          Thanks, responseEvent was the answer. I used: myDataSource.subscribe( responseEvent , function(oArgs) { alert(oArgs.response.getResponseHeader[ Server ]);
          Message 4 of 6 , Jul 31, 2008
          • 0 Attachment
            Thanks, "responseEvent" was the answer. I used:

            myDataSource.subscribe("responseEvent", function(oArgs) {
            alert(oArgs.response.getResponseHeader['Server']);
            });

            Cheers,
            Stef
          Your message has been successfully submitted and would be delivered to recipients shortly.