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

Deprecatre ZClient.request method #3154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

varshith257
Copy link
Contributor

@varshith257 varshith257 commented Sep 19, 2024

/claim #3133
fixes #3133

@varshith257 varshith257 changed the title Deprecatre req method Deprecatre ZClient.request method Sep 19, 2024
client <- ZIO.serviceWith[Client](_.batched)
chunk <- client.request(request).flatMap(_.body.asChunk)
} yield FormField.binaryField(name, chunk, mediaType)
@nowarn("cat=deprecation")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@987Nabil Any suggestions here?
I have supplied Scope explicitly with Client with Scope' and also tried wrapping up req in ZIO.scoped` by using streaming/batched appropriately wherever needed but it throwing compile error of not providing Scope.

URL(Path.empty, Location.Absolute(Scheme.HTTP, "localhost", Some(port))),
)
.batched @@ ZClientAspect.followRedirects(2)((resp, message) => ZIO.logInfo(message).as(resp))
response <- client.request(Request.get(URL.empty / "redirect"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here too

Copy link
Contributor Author

@varshith257 varshith257 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@varshith257
Copy link
Contributor Author

@987Nabil Any suggestions?

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

Successfully merging this pull request may close these issues.

Flag ZClient.request as deprecated
1 participant