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.

Provide RedirectingClient

See original GitHub issue

A user has to do it by himself/herself to handle a redirect response:

WebClient client = ...
AggregatedHttpResponse res = client.get("/redirect").aggregate().join();
String location = res.headers().get(LOCATION);
if (location != null) {
    AggregatedHttpResponse redirected = client.get(location).aggregate().join();
} else {
    ....
}

It’s a little verbose so it will be nice if we provide RedirectingClient.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
anuraagacommented, Feb 24, 2020

Oops didn’t realize they treat child logs differently 😅

0reactions
minwooxcommented, Feb 24, 2020

If the call is client -> RedirectingClient -> LoggingClient or (MetricCollectingClient) then, the redirecting is logged as well.

If the order is different which is: client -> LoggingClient or (MetricCollectingClient) -> RedirectingClient the redirecting is not logged.

It’s described here. http://line.github.io/armeria/client-retry.html#retryingclient-with-logging 🤔

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redirections in HTTP - MDN Web Docs - Mozilla
URL redirection, also known as URL forwarding, is a technique to give more than one URL address to a page, a form, or...
Read more >
Redirecting Client Connections - Snowflake Documentation
Client Redirect enables redirecting your client connections to Snowflake accounts in different regions for business continuity and disaster recovery, ...
Read more >
client-redirect-uri - IBM
This command specifies where the social login provider redirects responses to authorization requests. Syntax. client-redirect-uri URL. Parameters.
Read more >
Redirects: Different types and how to implement them - Moz
Redirection is the process of forwarding one URL to a different URL. What is a redirect? A redirect is a way to send...
Read more >
Redirects & SEO - The Complete Guide - Audisto
Advanced Redirect Guide - Learn everything about Redirects and how they affect SEO. Status Codes Cheat Sheet, Use Cases, Best Practice and Examples....
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