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.

Confusing behavior when constructing clients

See original GitHub issue

We’ve added some client creation shortcuts in #2396 but I wonder if it hasn’t resulted in some spaghetti.

I feel that this code doesn’t produce the intended result

ClientFactory factory = ClientFactory.builder().useHttp2Preface(false).build();
ClientOptions options = ClientOptions.builder().responseTimeoutMillis(timeout).build();  // Ends up being essentially equivalent to default client options, but I thought I'm only specifying response timeout
WebClient.builder(...)
  .factory(factory) // Want to use custom factory
  .options(options) // But custom factory gets overridden by ClientFactory.ofDefault(), which is highly surprising
  .build();

Probably related to #2483 (though I found it coincidentally, heh)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
anuraagacommented, Feb 14, 2020

I think we should remove factory from WebClientBuilder if we want to keep it on ClientOptions. It’s too hard to grok this relationship otherwise.

0reactions
trustincommented, Feb 14, 2020

Ah, OK. Thanks for explanation. Makes sense.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Psychological Trigger That's Confusing Your Customers
The Cognitive Bias That Confuses Customers​​ We're overloaded with too many decisions every day, and we need help making them. In fact, when...
Read more >
The 7 emotions that drive client behavior
Excitement · Fear · Nervousness · Impatience and Frustration · Confusion and feeling overwhelmed · Doubt, indecisiveness, and ...
Read more >
Understanding Clients' Behavior Is Key to Your Success as an ...
When you start understanding your clients' behavior, you can start to influence their decisions and help them make good financial decisions.
Read more >
Working with a Confused Client - ReminderMedia
Behaviors like rapid breathing, fiddling with jewelry or hair, and excessive yawning can all be signs of being uncomfortable and confused.
Read more >
How to Deal With Unrealistic Customers - Mind Tools
When you receive an unreasonable request from a client, your first response might be confusion or exasperation. Maybe the client has changed their...
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