+ Reply to Thread
Results 1 to 6 of 6

Difference between WINTTPREQUEST5.1 and XMLHTTP while pulling a CSV from a weburl

  1. #1
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Difference between WINTTPREQUEST5.1 and XMLHTTP while pulling a CSV from a weburl

    Hi guys and girls,

    I'm a bit stumped.
    I used the code below to pull a CSV from an internal website:

    XML:
    Please Login or Register  to view this content.
    This works fine - but I want this done with WinHTTP because I want to avoid the "HTTPS" security warning popup, by using the SetAutoLoginPolicy AutoLogonPolicyAlways

    Then if I change it to WinHTTP, it doesn't return me the desired result, but a mumbo-jumbo messed up result (so I guess it doesn't decode properly).
    Please Login or Register  to view this content.
    What am I doing wrong...?

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Difference between WINTTPREQUEST5.1 and XMLHTTP while pulling a CSV from a weburl

    A guess, but try:
    Please Login or Register  to view this content.

  3. #3
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Difference between WINTTPREQUEST5.1 and XMLHTTP while pulling a CSV from a weburl

    Oh how I was wishing that worked... but sadly, it's still a messed up pile of garbage

    What does .Option(6) do?

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Difference between WINTTPREQUEST5.1 and XMLHTTP while pulling a CSV from a weburl

    It forces following redirects. If you early bind, then the options are constants so you can read them.

    I'm not at all convinced that compression is the issue, especially if the same thing works for the xml request, though if you want to check try taking out that header or set it to text and see what happens.

    Just to clarify does the first example actually work?

  5. #5
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Difference between WINTTPREQUEST5.1 and XMLHTTP while pulling a CSV from a weburl

    Yes, first example works.
    And yes, I am an idiot.
    Taking out the gzip, deflate header gives me the desired result...

    Why on earth didn't I think of that???

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Difference between WINTTPREQUEST5.1 and XMLHTTP while pulling a CSV from a weburl

    Glad you got it sorted

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using XMLHTTP to upload a file to API
    By Wudsy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-23-2015, 12:35 AM
  2. XMLHTTP.ResponseBody / XMLHTTP.Responsetext Paste into Excel Sheet
    By gophins in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-11-2012, 11:38 AM
  3. Trouble with xmlhttp.Send
    By basstwo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-07-2010, 07:02 PM
  4. XMLhttp VBA & SSL
    By superspiker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2006, 12:56 AM
  5. xmlhttp and ie cache
    By Jack Clift in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-10-2005, 11:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1