How to perform an HTTP POST request in ASP?

You can try something like this: Set ServerXmlHttp = Server.CreateObject(“MSXML2.ServerXMLHTTP.6.0”) ServerXmlHttp.open “POST”, “http://www.example.com/page.asp” ServerXmlHttp.setRequestHeader “Content-Type”, “application/x-www-form-urlencoded” ServerXmlHttp.setRequestHeader “Content-Length”, Len(PostData) ServerXmlHttp.send PostData If ServerXmlHttp.status = 200 Then TextResponse = ServerXmlHttp.responseText XMLResponse = ServerXmlHttp.responseXML StreamResponse = ServerXmlHttp.responseStream Else ‘ Handle missing response or other errors here End If Set ServerXmlHttp = Nothing where PostData is the data … Read more

WinError 10049: The requested address is not valid in its context

from socket import * soc = socket(AF_INET, SOCK_STREAM) soc.connect((‘168.62.48.183’, 80)) soc.send(‘GET /miners/get?file=BFGMiner-3.99-r.1-win32.zip HTTP/1.1\nUser-Agent:MultiMiner/V3\nHost: www.multiminerapp.com\n’) with open(“http-response.txt”,”w”) as respfile: response = soc.recv(1024) # <— Use select.epoll or asyncore instead! respfile.writelines(response) The reason for why your code fails tho is because you’re trying to bind to an external IP. Your machine is not aware of this IP … Read more

HttpCookieCollection.Add vs HttpCookieCollection.Set – Does the Request.Cookies collection get copied to the Response.Cookies collection?

There is a difference: Response.Cookies.Add() will allow duplicate cookies to be set http://msdn.microsoft.com/en-us/library/system.web.httpcookiecollection.add.aspx Response.Cookies.Set() will make sure the cookie is unique by first checking to ensure the cookie doesn’t exist http://msdn.microsoft.com/en-us/library/system.web.httpcookiecollection.set.aspx Duplicate cookies typically requires extra handling to determine which is the most recent. I’m not sure of a case when you would want duplicate … Read more