Trying to POST using WinInet API functions.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Trying to POST using WinInet API functions.

  1. #1
    Mark Alexander Bertenshaw Guest

    Trying to POST using WinInet API functions.


    Good day -

    I am writing a component to allow one of our web servers to grab content
    from another web server via ASP. I have had success at getting basic pages
    to be obtained, but for some reason, POSTed data appears not to be noticed
    by the web server; this is found by retrieving Request.Form, which in this
    case is an empty string.

    I have been looking on the MS Knowledge Base, and found an article (Q167706
    - http://support.microsoft.com/support.../Q167/7/06.asp ) which
    has some sample code which allows you to POST data. It is very similar to
    mine, but unfortunately it has the same problem.

    Can anybody suggest what might be going wrong?

    Thanks,

    -------------------------
    Mark Alexander Bertenshaw
    Programmer/Analyst
    Prime Response
    Brentford
    UK


  2. #2
    Mark Alexander Bertenshaw Guest

    Re: Trying to POST using WinInet API functions.


    I have subsequently found another Knowledge Base article, Q175474
    (http://support.microsoft.com/support.../Q175/4/74.ASP) which says
    that Active Server Pages are very fussy (or fully HTML compliant), and you
    need to send a header ("Content-Type: application/x-www-form-urlencoded")
    when you do a post, or it won't bother to receive the posted data. Nice to
    see Microsoft playing by the rules here 8-).

    -------------------------
    Mark Alexander Bertenshaw
    Programmer/Analyst
    Prime Response
    Brentford
    UK


  3. #3
    Mark Alexander Bertenshaw Guest

    Re: Trying to POST using WinInet API functions.


    I have subsequently found another Knowledge Base article, Q175474
    (http://support.microsoft.com/support.../Q175/4/74.ASP) which says
    that Active Server Pages are very fussy (or fully HTML compliant), and you
    need to send a header ("Content-Type: application/x-www-form-urlencoded")
    when you do a post, or it won't bother to receive the posted data. Nice to
    see Microsoft playing by the rules here 8-).

    -------------------------
    Mark Alexander Bertenshaw
    Programmer/Analyst
    Prime Response
    Brentford
    UK


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center