+ Reply to Thread
Results 1 to 5 of 5

Using winhttp.winhttprequest.5.1 retrieving web data returns "Server Error 405"

  1. #1
    Forum Contributor
    Join Date
    11-12-2010
    Location
    HK
    MS-Off Ver
    Excel 2010
    Posts
    189

    Using winhttp.winhttprequest.5.1 retrieving web data returns "Server Error 405"

    Hi,

    I would like to download data from this website https://www.hkex.com.hk/eng/market/s...e/eisdeqty.htm by using winhttp.winhttprequest.5.1 or Microsoft.XMLHTTP method, but neither works.

    Here's my code
    Please Login or Register  to view this content.
    The below sentence is shown under dom.Body.innerHTML in Local Variable window.
    "Server Error 405 - HTTP verb used to access this page is not allowed. The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access."

    But I can download the data through Internet Explorer. Can anyone please tell me the reason behind?
    English is not my first language

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Using winhttp.winhttprequest.5.1 retrieving web data returns "Server Error 405"

    I do not know what is BytesToBstr, so I commented that line

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-12-2010
    Location
    HK
    MS-Off Ver
    Excel 2010
    Posts
    189

    Re: Using winhttp.winhttprequest.5.1 retrieving web data returns "Server Error 405"

    Quote Originally Posted by AB33 View Post
    I do not know what is BytesToBstr, so I commented that line

    Please Login or Register  to view this content.
    Thanks, it works. Could you please tell me what's the reason of failure when I used "POST" instead of "GET"?

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Using winhttp.winhttprequest.5.1 retrieving web data returns "Server Error 405"

    Last edited by AB33; 05-31-2015 at 06:02 AM.

  5. #5
    Forum Contributor
    Join Date
    11-12-2010
    Location
    HK
    MS-Off Ver
    Excel 2010
    Posts
    189

    Re: Using winhttp.winhttprequest.5.1 retrieving web data returns "Server Error 405"

    thanks a lot!

+ 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. How to loop different href links after using winhttp.winhttprequest.5.1
    By lubbamkt in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2014, 08:40 AM
  2. [SOLVED] Strange problem on web extract using MSXML2.XMLHTTP / WinHttp.WinHttpRequest.5.1
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2013, 05:13 AM
  3. Open files from FTP server (works with "servername" but doesn't work with "ip address")
    By adammsu1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2012, 04:30 PM
  4. Replies: 4
    Last Post: 12-30-2011, 11:24 AM
  5. Me.Controls.Add returns "Compile error, method or data member not found"
    By mattisch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2007, 07:53 AM

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