Solved

Sending xml in HTTP post

Posted on 2004-09-09
5
168 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 49

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now