Issue with HttpClient Dependency Injection in Effect Typescript Library
I feel bad asking another question, but i'm running into a similar problem that I know is a me problem again, but clearly i'm not understanding something.
I am creating a server, I then provide the spec, the route handler, etc.
All thats fine.
I create this handler which has this type:
AIService needs HttpClient
The part thats throwing me off is the HttpClient. This is a handler, so i should have HttpClient there, however I have a service that uses the HttpClient, not directly in the handler.
So my spec where I launch my server has this issue:
So based on my conversation yesterday, i must be trying to use the HttpClient where I can't use it? Should I pass the
Is this something special about Effect.service that i'm messing up?
Excuse the code Its not clean at all but i tried to remove noise that wasn't relative to the problem.
I have a play link https://effect.website/play#2730e05a7a56
I apologize again for another question i just have some mental block about this i'm not resolving. i've tried a few different things.
I can manually provide a NodeHttp layer but i'm not sure thats the right thing to do
I am creating a server, I then provide the spec, the route handler, etc.
All thats fine.
I create this handler which has this type:
AIService needs HttpClient
The part thats throwing me off is the HttpClient. This is a handler, so i should have HttpClient there, however I have a service that uses the HttpClient, not directly in the handler.
So my spec where I launch my server has this issue:
So based on my conversation yesterday, i must be trying to use the HttpClient where I can't use it? Should I pass the
client I yield* to the service?Is this something special about Effect.service that i'm messing up?
Excuse the code Its not clean at all but i tried to remove noise that wasn't relative to the problem.
I have a play link https://effect.website/play#2730e05a7a56
I apologize again for another question i just have some mental block about this i'm not resolving. i've tried a few different things.
I can manually provide a NodeHttp layer but i'm not sure thats the right thing to do
