Wrong example with parseUrl and object #42

Closed
cabitee opened this Issue Dec 26, 2012 · 2 comments

Comments

2 participants
@cabitee

cabitee commented Dec 26, 2012

Hi,

I think this example cannot work :

// Or you could try letting feedparser handle working with request (experimental)
feedparser.parseUrl(reqObj)
  .on('response', function (response){
    // do something like save the HTTP headers for a future request
  })
  .on('article', callback);

Because, in your code you are only sending url information to "request"

var req = {
    uri: url,
    headers: { 'Accept-Encoding': 'identity' }
  };
  request(req)
    .on('error', fp.handleError.bind(fp))
    .on('response', handleResponse)
    .pipe(fp.stream)
    ;

Thank you for you work! :)

Edwin

@danmactough

This comment has been minimized.

Show comment Hide comment
@danmactough

danmactough Dec 28, 2012

Owner

Thanks for raising the issue. Sometimes the documentation lags changes. But, this is one of those times when I "documented" something I hadn't implemented yet. Call it aspirational documentation. 😄

I think I'll implement it rather than change the documentation...

Owner

danmactough commented Dec 28, 2012

Thanks for raising the issue. Sometimes the documentation lags changes. But, this is one of those times when I "documented" something I hadn't implemented yet. Call it aspirational documentation. 😄

I think I'll implement it rather than change the documentation...

@danmactough

This comment has been minimized.

Show comment Hide comment
@danmactough

danmactough Dec 28, 2012

Owner

Closed by 13d19af

Owner

danmactough commented Dec 28, 2012

Closed by 13d19af

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment