Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Sending xml in HTTP post

Posted on 2004-09-09
5
171 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
5 Comments
 
LVL 8

Accepted Solution

by:
mladenovicz earned 50 total points
ID: 12014538
req.send YourXMLString
0
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 12014557
0
 
LVL 3

Expert Comment

by:aParser
ID: 12020573
0
 
LVL 8

Expert Comment

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

829 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