You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "David Handermann (Jira)" <ji...@apache.org> on 2021/04/21 15:37:00 UTC

[jira] [Commented] (NIFI-8454) InvokeHTTP does not report final URL after following redirects

    [ https://issues.apache.org/jira/browse/NIFI-8454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17326644#comment-17326644 ] 

David Handermann commented on NIFI-8454:
----------------------------------------

This sounds like a useful feature [~pkelly.nifi]!  The OkHttp Response object has an associated [request|https://square.github.io/okhttp/4.x/okhttp/okhttp3/-response/request/] property that contains the associated request details, which appears to contain the final URL.

> InvokeHTTP does not report final URL after following redirects
> --------------------------------------------------------------
>
>                 Key: NIFI-8454
>                 URL: https://issues.apache.org/jira/browse/NIFI-8454
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 1.13.2
>            Reporter: Paul Kelly
>            Assignee: Paul Kelly
>            Priority: Minor
>              Labels: InvokeHTTP
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> If InvokeHTTP is set to follow redirects, there currently is no way to retrieve the final URL which was the ultimate target of any redirects that were followed.
> I propose adding a new attribute "invokehttp.response.url" to include the final URL when InvokeHTTP is set to follow redirects.  The current attribute "invokehttp.request.url" contains the URL which was originally requested, and this new attribute will contain the URL that was ultimately retrieved.
> For example, if the URL "http://bitly.com/1sNZMwL" is retrieved, invokehttp.request.url will continue to contain "http://bitly.com/1sNZMwL" and invokehttp.response.url will contain "https://en.wikipedia.org/wiki/Bitly".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)