question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecate Client#fetch

See original GitHub issue

@ChristopherDavenport has been arguing for this, and I like @SystemFw’s argument about not burying use.

Steps:

  1. Add @deprecated annotation to both overloads of Client.fetch.
  2. Replace client.fetch(req)(f) with client.run(req).use(f) in tests and docs.

Bonus step 1.5, but more difficult: Implement a scalafix rule. Would make step 2 easier, and will help a lot of people upgrading.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
rossabakercommented, Apr 26, 2020

@satorg It’s yours!

1reaction
rossabakercommented, Apr 26, 2020

@kevinmeredith The problem with your IO version is leaking the response resource outside fetch. It’s equivalent to the .fetch(F.pure) or .fetch(F.delay) anti-patterns. But the Resource version is also unsafe: you’re reading the response body twice. It works when the body is created in memory, but it would fail when the response body is backed by a network socket.

@satorg I’d like to remove them, but it’s been pointed out that the client DSL still returns requests in F[Request[F]]. There was a conversation about evolving away from that as well. I think maybe those two should go together in their own PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced topics on caching in Apollo Client
This article describes special cases and considerations when using the Apollo Client cache. Bypassing the cache. Sometimes you shouldn't use the cache for...
Read more >
Used property "fetch" on versionless client - this is deprecated.
The fix is trivial, but I'm not sure what version to use. Otherwise happy to make a PR. The text was updated successfully,...
Read more >
Browser content redirection | Citrix Virtual Apps and Desktops ...
Client fetch and client render: Because the Citrix Workspace app contacts the web server directly, it requires internet access. This scenario ...
Read more >
@sanity/client - npm
Client for retrieving, creating and patching data from Sanity.io. Latest version: 3.4.1, last published: 3 months ago.
Read more >
Microsoft Graph Client - Fetch root site of Office 365 group - Error
Can't recall exactly which one was in my case - I think it was Group.Selected. As soon you remove the problematic permission the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found