How to run __doPostBack and catch download link in idHttp - delphi

i have used idHttp.post() to login inside a site
then i posted my information to the download page which is something like an archive (needs start date, end date and etc) and then sent submit button post
when i open the final response code (after posting submit) i can see the links for download, but they are something like :
__doPostBack('DG_FileList$ctl03$LB_Download','')
after i click on the link (manually inside a browser), http analyzer shows another post like this :
__EVENTTARGET DG_FileList$ctl03$LB_Download
and i get redirected to a download.aspx page and download starts in the browser
i tried to Post this like other informations but i got an error for response code, am i doing something wrong ? can i even run the _doPostBack with post method ?
if not, what can i do ?
Thanks.

Related

Download a file that after recaptcha fails and redirect to home page

I have tried everything I could think of to download any document from this page: https://www.acingov.pt/acingovprod/2/index.php/zonaPublica/zona_publica_c/indexAdjudicacoes/165
The download button launches a new window (while sending a POST request), the URL changes, but after a while this new page redirects to the homepage. I can see, using a HTTP sniffer, some ids and recaptcha response being sent to the new window, but nothing really happens and no ZIP file is downloaded. Tried different browsers and OSes. Any ideas/solutions? Thanks

Request is loading twice in Microsft Edge Browser, when tried to open the URL in window.open

Hi I'm facing an issue that, onclick on hyper link calling script funciton which opens the URL in window.open.
In netwrok tab Noticed that URL request is sending twice, for one reposne code is 302(doesn have nay response data) and for another one response code is 200(which has reponse data), This behaviour in Microsoft edge browser.
In internet explore noticed behaviour is different, on click on hyperlink seeing request is sending twice, both requests are getting succesfull with response code 200 with proper response data.
Below is the code I've done so far of the Hyper link. Can some one help me why multiple request are triggering how to fix this to trigger only one request.
<a tabindex="13" title="This link will open a new browser window that contains the user details."
onclick="javascript:openChildWindow('http://xx.xx.xx.xxx:xxxx/xxxx/channel/session.cgi?sessargs=p47iorSBMUG1tKkTcNpjM4qNdGTees3H');return false;"
href="http://xx.xx.xx.xxx:xxxx/xxxx/channel/channel/session.cgi?sessargs=NliOOYGLmDf1yePDXopw8o2IMx2HYyg1">View details</a>

How to see in fiddler what is posted to server

I installed fiddler and made a GET request. It gives me what is returned from the server in header and cookies etc. Now I want to know the way to check (using fiddler) what is being posted to the server when I post a form (with some values in text boxes using firefox or any browser). Remember I am not seeking to know the way to compose a post request in fiddler. I want to know what browser sends to the server. Actually compose a post request is not working and it returns that same page which I post, so I want to know what browser is doing which I am unable to do?
Thanks in advance.
Click on the request that you wish to see in Fiddler, right click and select "Decode Selected Sessions".
If you're saying: "I don't see any traffic in Fiddler's Web Sessions list when sending a POST from Internet Explorer", you should follow the troubleshooting steps listed here: https://groups.google.com/forum/#!topic/httpfiddler/SsZnGxdxklg
If the target page is HTTPS, you need to ensure that you enable HTTPS decryption or you won't see anything other than the CONNECT tunnel through which HTTPS traffic flows.
Otherwise, if you do see the POST in the Web Sessions list, double-click it to activate the Inspectors tab. Use the Web Forms tab or the the Raw tab to see the data posted from the client application.
You might want to watch the Fiddler tutorial videos to quickly get up to speed on how to use Fiddler: http://www.youtube.com/playlist?list=PLvmaC-XMqeBbw72l2G7FG7CntDTErjbHc

Mediafire API get OTD direct links

Does anybody know if Mediafire can generate, using its API, an One Time Download direct link?
I know it can generate a direct link AND/OR an One Time Download link, but can it do both?
You can't generate one time direct download link, simply because one time download link is only redirecting to direct download link...
After click "Download", you receive 302 HTTP code (redirect) from POST request... So there is GET request to Location header from response, which is direct download link :)

Facebook Open Graph Scraping

I've recently enabled the Facebook Open Graph stuff on my web app (so and so has just read this and that on here and there). Now I post the request to Facebook when a user posts something, as part of the page load in the controller. The problem is I receive the following error:
HTTP 500: Response body: {"error":{"type":"Exception","message":"Could
not retrieve data from URL."}}
My first thought is that the open request to load the page is blocking any FB scraping of OG information, as it seems after it's been cached I no longer receive this error.
Is this likely? If so, what's the best way to work around it?
WHY THIS HAPPENS:
I had this same problem today, and it is because your Koala script (assuming you're using koala - if not, you should try it out because it's great) sends its request to Facebook before your URL is up. This means that when Facebook registers the post, it comes to the URL you specified to pick up the meta tags. Unfortunately, the page itself hasn't been loaded yet, giving it a 500 error
HOW TO SOLVE IT:
Use the delayed_job gem to prevent your post call from occurring before the page loads, which allows facebook to scrape your metatags correctly.
FOR EXAMPLE:
def post_to_facebook([ACCESS_TOKEN])
graph = Koala::Facebook::API.new([ACCESS TOKEN])
graph.put_connections("me", "[APP NAMESPACE]:[ACTION]", :[OBJECT TYPE] => [OBJECT_URL])
end
handle_asynchronously :post_to_facebook

Resources