I'm trying to do an HTTP post request. My server is running a php script with code here
<?
$siteurl = $_REQUEST['address'];
$postdata = '';
$fakeua = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)';
$ch = curl_init($siteurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_seto...
We are trying to connect to:
http://resellertest.enom.com/interface.asp?command=nameofcommand&uid=yourloginid&pw=yourpassword&paramname=paramvalue&nextparamname=nextparamvalue
Where we need to append parameters to http url and the response from the site is xml.
Sample xml response:
<?xml version="1.0" ?>
<interface-r...
I'm building a server application that needs to perform a lot of http requests to a couple other servers on an ongoing basis. Currently, I'm basically setting up about 30 threads and continuously running HttpWebRequests synchronously on each thread, achieving a throughput of about 30 requests per second.
I am indeed setting the Servi...
This ajax thing im working on is not doing what i tell it to do.
On the client JS side I alert everything that is sent through the request, and on the PHP side I print out everything that it receives. These two lists of variables are not the same. I do not understand why.
Here how I am sending the data (over post):
xhr.onreadystatecha...
Hi folks, I need to access a controller level action from another action. This is accessed by the view (so need authenticity token)
def post_message
#creates the message
#normally accessed via webform with authenticity token
end
def post_via_email
#my virtual mailserver calls this method when it receives an email
#i need to cal...
I would like to send multiple HTTP requests to a server, using pipelining where possible, and otherwise using multiple TCP connections. However, HttpWebRequest seems to automatically use multiple connections if ServicePointManager.DefaultConnectionLimit is bigger than 1. I can only get it to pipeline if I set this to 1. Is there an alter...
Hi,
I need to use HttpWebClient to upload a series of files at once.
I am following the sample code found on this thread:
http://stackoverflow.com/questions/566462/upload-files-with-httpwebrequest-multipart-form-data
As several people reported on that thread, I am also getting HTTP status 500 errors. I have tried 2 of the solutions o...
The IBM RTC RESTful api gives an example of a shell script for authenticating with the server:
COOKIES=./cookies.txt
USER=my_user
PASSWORD=my_password
HOST="https://myJazzServer:9092/jazz"
curl -k -c $COOKIES "$HOST/authenticated/identity"
curl -k -L -b $COOKIES -c $COOKIES -d j_username=$USER -d j_password=$PASSWORD "$HOST/authentic...
I'm dynamically adding textboxes to a form on my jsp page using Javascript. When that form is submitted to an action, how does my action get the values of those textboxes? (I'm using Struts 2, btw.) In ASP.NET, I was able to find them in Form.Request/FormCollection. Is there a Struts 2 equivalent? Thanks a million.
...
I need to call a method from a webservice, so I've written this code:
private string urlPath = "http://xxx.xxx.xxx/manager/";
string request = urlPath + "index.php/org/get_org_form";
WebRequest webRequest = WebRequest.Create(request);
webRequest.Method = "POST";
webRequest...
I have built a WebRequest in a WPF application into a background worker, but it is hanging if the website does not return a 404 error. There is a timeout, and found that some people have also had the same problem with the timeout not working and making the WebRequest hang. I tried to implement the code recommended for fixing the hang whi...
I'm invoking a REST service via http which returns a stream as the response.
My client code looks like so:
Uri uri = new Uri(remoteAddress);
var webRequest = (HttpWebRequest)WebRequest.Create(uri);
webRequest.Method = "GET";
webRequest.ContentType = "multipart/mixed";
...
Hi Friends,
Details of the problem:
There is one page which is actually a streaming to The Axis IP camera which spits MJPEG output
It requires user to log in with the user name/password promp on browser
I am using this stream to show video directly on a web page
It shows video correctly but asks user to provide correct user name and ...
I have to run a get request from a PHP script, but I'm in a fairly limited environment (tight firewalls, can't modify the PHP install, etc...).
fsockopen() returns an error and http_get() seems to not be installed. The only other way I know of is to call file_get_contents(), which works OK, except for the fact that I need to set the re...
I have a ASP.NET Web Forms application that internally makes many SOAP and REST calls to web services. The SOAP calls are made using Microsoft's own "wrapping" code. The REST calls are made from a simple REST client. This client uses Using blocks to dispose of any resources.
The application runs fine for a few hours but then hangs up. T...
So twitter changed its way of doing authentication to OAuth, I finally had no choice but to update my app. I got the twitter stuff working (So i have a nice bit of saved OAuth information in my application) now I have to get the twitpic api working again. There are no libraries that handle the OAuth that I found so I am having to do it...
I have an app in C# which serializes an object into xml into a http stream to my server. The server has some php which runs a stored procedure in mysql with the xml data as its only parameter.
The problem is that someone could very easily just send up an xml of the same format with a whole lot of entires that would ruin the database wit...
I'm running this application on a server that has assigned 5 IPs. I use HttpWebRequest to fetch some data from a website. But when I make the connection I have be able to specify which one of the 5 IPs to make the connection from. Does HttpWebRequest support this? If it doesn't can I inherit a class from it to change it's behavior? I nee...
Hello,
my Code:
System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://192.168.2.2/web/movielist");
req.Timeout = 2000;
System.Net.WebResponse res = req.GetResponse();
System.IO.Stream responseStream = res.GetResponseStream();
The requested document (movielist) is a very big document and it req...
I want to get the data from this page and insert it to my mssql database. How can I read this data with asp.net c#? SehisID is a value from 1 to 81.
EDIT:
My code is below.
for (int i = 1; i <= 81; i++)
{
HttpWebRequest rqst = (HttpWebRequest)WebRequest.Create("http://www.milliyet.com.tr/Secim2009/api/belediyelist.ashx?sehirid=" + ...