Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sending xml in HTTP post

Posted on 2004-09-09
5
Medium Priority
?
175 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
[X]
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
  • 2
5 Comments
 
LVL 8

Accepted Solution

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

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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 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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

718 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