Effect CommunityEC
Effect Community2y ago
45 replies
attila

Injecting FileSystem Service into HttpClient

If I have a client of type Http.client.Client<Http.response.ClientResponse, Http.error.HttpClientError | PlatformError, FileSystem>, how do I provide it the FileSystem service? I ended up with this Client type because of
Http.client.mapRequestEffect(
  Http.request.fileBody(file.path, {
    contentType: file.contentType,
  })
)
Was this page helpful?