Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sending xml in HTTP post

Posted on 2004-09-09
5
Medium Priority
?
177 Views
Last Modified: 2010-05-02
Sorry im new to VB, i have this code fragment which posts to a url and then prints out the responce. Assuming i had some xml in the form of a string, how would i fire it at the this address? would it be a parameter of req.send?



Private Sub Command1_Click()

Dim req As New MSXML2.XMLHTTP30

req.Open "POST", "http://195.217.202.154/application/cmti/querylogin.asp?", False
' Set the HTTP Headers
req.setRequestHeader "HOST", "localhost"
req.setRequestHeader "Content-Type", "multipart/form-data"

req.send

Dim responseStr As String
responseStr = "Content-Type: " & req.getResponseHeader("Content-Type") & vbCrLf
responseStr = responseStr & "Content-Length: " & req.getResponseHeader("Content-Length") & vbCrLf
responseStr = responseStr & req.responseText & vbCrLf & req.responseBody & vbCrLf & req.statusText
Debug.Print responseStr

End Sub
0
Comment
Question by:danBosh
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
mladenovicz earned 200 total points
ID: 12014538
req.send YourXMLString
0
 
LVL 54

Expert Comment

by:Ryan Chong
ID: 12014557
0
 
LVL 8

Expert Comment

by:mladenovicz
ID: 12563799
I think that points should be splitted
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question