Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for http.ClientRequest#setHeader, #getHeader, #removeHeader #5

Open
ChrisC opened this issue Aug 22, 2014 · 7 comments
Open

Comments

@ChrisC
Copy link

ChrisC commented Aug 22, 2014

Am running into a lot of problems using Sepia with Superagent. I've determined that the problem is that methods such as setHeader, getHeader are removed from http.ClientRequest. See the issue and solution as described here for the Nock VCR lib :
nock/nock#41
jherdman/nock@0f4e634

Would it be inadvisable to add something similar to Sepia?

@avik-das
Copy link
Contributor

@ChrisC : I've run into this issue when I was making sure sepia worked with the request library. The discussion you linked to hits the nail on the head. Indeed, the fundamental problem is that the "dummy" request sepia provides does not behave like an http.ClientRequest because it isn't one.

I like the approach nock takes, and it would be great to have that in sepia. The implementation in nock isn't exactly self-contained, so it'll take some work to get a corresponding implementation in sepia.

@gilbert
Copy link

gilbert commented May 27, 2015

I just ran into this issue today. Did you find a workaround, @ChrisC ?

@gilbert
Copy link

gilbert commented May 27, 2015

I fixed the problem by switching to node-replay.

@airportyh
Copy link

Also ran into this while trying out sepia - attempting to use it with supertest.

@ajsharp
Copy link

ajsharp commented Dec 15, 2015

Bump

@avik-das
Copy link
Contributor

Hi @ajsharp: I actually haven't committed to this:

I like the approach nock takes, and it would be great to have that in sepia. The implementation in nock isn't exactly self-contained, so it'll take some work to get a corresponding implementation in sepia.

What would be great is a minimal test case, and then I could probably just stub out the necessary methods.

@TamerShlash
Copy link

Running to problems when using with supertest as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants