problems with POST method in Internet Transfer Control 
Author Message
 problems with POST method in Internet Transfer Control

I'm having some problems with the POST-method when using the
Microsoft Internet Transfer Control

The biggest problem is: I can't find any GOOD documentation about
it.

Now the real problem: I will explain it with some examples.

I would like to imitate a HTML-page containing a form, with my application
using the INET-control (or anything else that works)

The HTML page looks like this

<HTML>
<HEAD></HEAD>
<BODY>
    <FORM name="theForm" action=" http://www.*-*-*.com/ ">
        <TEXTAREA name="theTextArea">
            The Message I would like to send
        </TEXTAREA>
    </FORM>
</BODY>
</HTML>

The application works like this
-----------------------------------------
Public Sub SendRequest()
        myMessage = "TEST"
        Inet1.URL = " http://www.*-*-*.com/ "
        headers = "Content-Type: applicationent-Type:
application/x-www-form-urlencoded"

        Inet1.Execute , "POST", "theTextArea=" & myMessage, headers
End Sub
------------------------------------------

The Inet control raises an event
------------------------------------------
Private Sub Inet1_StateChanged(ByVal State As Integer)
Dim vtData As Variant ' Data variable.
Dim strData As String: strData = ""
Dim bDone As Boolean: bDone = False
       Select Case State
            Case icResponseCompleted:   Debug.Print "Response Completed"
                ' Get first chunk.
                vtData = Inet1.GetChunk(1024, icString)
                DoEvents
                Do While Not bDone
                    strData = strData & vtData
                    DoEvents
                    ' Get next chunk.
                    If Not Inet1.StillExecuting Then vtData =
Inet1.GetChunk(1024, icString)
                    If Len(vtData) = 0 Then
                        bDone = True
                    End If
                Loop
                Debug.Print vbCrLf & strData
       End Select
End Sub
--------------------------------------

And now the problem. When I create an ASP-page on our own server
it works fine. the message gets through. The ASP-page looks like this
-----------------
<%= request.form("theTextArea") %>
-----------------
But when I send it to the server " http://www.*-*-*.com/ " it won't work.
The server can't find the message.

I tried to send it from my HTML-page and it worked fine, but not with my
application using inet-control

What am I doing wrong??

There has to be a difference of what the browser sends to the server and
what I made the Inet-control send, but I can't figure out what or how I
should
find information about it...

Thanks for any reply

/Johan



Sun, 24 Feb 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB5.0 - Internet Transfer Control, Post Method Question

2. Internet Transfer Control - POST method

3. Internet Transfer Control - Post Method

4. NEEDED: Example of POST operation with Internet Transfer Control - Execute method

5. HELP! Internet Transfer Control POST problem

6. Internet Transfer Control - problem with SIZE operation for EXECUTE method

7. Problems using Microsoft Internet Transfer Control - OpenUrl method.

8. Internet Transfer Control - problem with SIZE operation of EXECUTE method

9. Internet Transfer Control - problem with SIZE operation of EXECUTE method

10. Internet Transfer Control - problem with SIZE operation of EXECUTE method

11. Internet Transfer Control PROXY Problem on execute method

12. Internet Transfer Control Password Problem on execute method

 

 
Powered by phpBB® Forum Software