Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the Request Header in

Status
Not open for further replies.

Mayoor

Programmer
Jan 16, 2004
198
GB
Code:
Set objServerXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
	
	  ' Opens the connection to the remote server.
	  objServerXMLHTTP.Open "GET", strRequestPath, False
	  objServerXMLHTTP.SetRequestHeader "Content-type", "text/html;" 

	  
					
	  ' Actually Sends the request and returns the data:
	  objServerXMLHTTP.Send
		
		strOutput = objServerXMLHTTP.responseText

	  Set objStream = Server.CreateObject("ADODB.Stream")
	  objStream.Open
	  objStream.WriteText strOutput
	  objStream.SaveToFile strResponsePath, 2
		Set objStream = Nothing	
	  
	  Set objServerXMLHTTP = Nothing

I need to set the encoding somewhere in here to charset= 8859-1

Can someone advise please?

 

try this

Code:
objServerXMLHTTP.SetRequestHeader "Content-type","text/xml;
charset=8859-1");


hth
simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top