c# - Get final redirect URL -


i writing code through authentication api based web site. have api key site needs during login process. when call login method api key, supposed redirect predefined url parameter contain request token.

e.g on firing url in browser, https://kite.trade/connect/login?api_key=hcwmefsivttbchla

i redirected to

https://impacted-purposes.000webhostapp.com/?status=success&request_token=nb0vrfota9ott1r02q153pk3422joruf (the request token change in every run)

notice request token in url on redirected url. that's need code.

so, use code referred here getfinalredirect: getting redirected url original url

ie. call:

getfinalredirect("https://kite.trade/connect/login?api_key=hcwmefsivttbchla") 

however, don't final redirect. understand there javascript redirect, checking response, doesn't suggest so.

any pls final url can parse request token it.

well, can't test since don't have account. , hope thats not real-api-key...

but function you're using sending head request server. head request has no response. head request redirects included in http headers. if redirect done html-meta tags or javascript have send (or post) request...

if fails set breakpoint inside function , @ received http-headers , response text...


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -