biesiad/deelay

Doesn't seem to return the content of the target url.

Closed this issue · 3 comments

Unless I'm doing something wrong, or expectations are wrong, this doesn't seem to return the content of the target page which rather limits it's usefulness.

I'm sorry the library doesn't meet your expectations. If you have a specific problem or suggestion, and share the details, I'll try to help you.

Sorry if I wasn't clear enough. The problem is that the library does not return the content (body) of the page. It only return a status code.
Can you make it return the body of the page? Or is there a way to do that already?

The way the throttling is implemented is by waiting n milliseconds and redirecting to the original url provided by the user. You can see it being done here: https://github.com/biesiad/deelay/blob/master/index.js#L17. After your client gets redirected, it should receive a response from the web server where the resource is located. Without looking at the specific case that you've run into, it's hard to say where the issue is.