Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[Func] HTTPRequest: for Web APIs [AHK-B + AHK-L+Unicode+x64]


  • Please log in to reply
380 replies to this topic
Looq
  • Members
  • 101 posts
  • Last active: Nov 04 2014 03:40 AM
  • Joined: 07 Feb 2005

I was just wondering, is there a way to get HttpRequest to download a file without using internet explorer's cache folder? I currently use this function to download and save hundreds of files to my hard drive, but I noticed that every file it downloads also ends up in ie's cache folder. Normally it wouldn't be a big deal but the sheer number of files takes up a lot of space. I've tried the SaveAs option along with Resume, but both of them leave duplicates in that folder. Is there an option to only save the file in one specific place? Or do I have to tweak internet explorer's options?



Looq
  • Members
  • 101 posts
  • Last active: Nov 04 2014 03:40 AM
  • Joined: 07 Feb 2005

Okay, I fixed it.

Turns out I just needed to add these to the options:

+DONT_CACHE
+NO_CACHE_WRITE

A quick look at the code and those two things jumped out at me B)
Thanks for this excellent function VxE! Keep up the good work!



kaka
  • Members
  • 76 posts
  • Last active: Jul 02 2018 05:24 AM
  • Joined: 05 Jan 2007

Someone please help me. I am trying to post a reques and write source into a file but i am getting error. posting here my code. please tell me what i am doing wrong?
 

URL := "http://result.biselahore.com/Home/Result"
data := "degree=HSSC&rollNum=45654&session=2&year=2007"
Headers=
(LTRIM
Host: result.biselahore.com
Cookie: ASP.NET_SessionId=cvqbpb3e3uq1pr4aacbeakqv
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
)
httprequest( url, data, headers, "+Flag: INTERNET_FLAG_NO_COOKIES `n >MyResult.html" )
#include HTTPRequest.ahk

Posted Image

kaka
  • Members
  • 76 posts
  • Last active: Jul 02 2018 05:24 AM
  • Joined: 05 Jan 2007

Experts are u there?


Posted Image

bichlepa
  • Members
  • 62 posts
  • Last active: Dec 17 2016 08:45 PM
  • Joined: 04 Jul 2011

Thanks VxE,

 

I have included the HTTPRequest into AutoHotFlow. There is now an action "HTTP Request"



Dworkin
  • Members
  • 1 posts
  • Last active: Sep 03 2017 11:57 PM
  • Joined: 06 Oct 2013

can someone pls give link on it?