httprequest

Ruby send JSON request

How do I send a JSON request in ruby? I have a JSON object but I dont think I can just do .send. Do I have to have javascript send the form? Or can I use the net/http class in ruby? With header - content type = json and body the json object? Thanks ...

.NET HttpRequest from 1.1 to 3.5

We have to ASP.NET applications, one in 1.1 and one in 3.5. In order to log our errors in the same location we are going to create a WebService that the 1.1 app can call. If I include an HttpRequest as one of the parameters to the webservice, will there be a versioning problem? ...

android httprequest compress response.

I am using httprequest to retrieve data from webservice, i know using tomcat we can compress response data using gunzip algo. but how can uncompress data to display, is un-compress is time consuming?? is there any other way to compress response and uncompress on android ??? ...

How to use Http, Socks4 and Socks5 proxies in java?

I want to screen-scrape a website and for that I want to use Http, Socks4 and Sock5 proxies. So my questions are as follows: Is it possible to use these proxies through Java without using any other external API? For instance, Is it possible to send a request through HttpURLConnection through theseproxies? If it is not possible, then Wh...

How do I create a request object in Django?

So I'm using Django with Google App Engine and I have an urls.py file that redirects each url to a corresponding method. Each one of those methods is automatically passed "request" as one of the arguments, which I believe is an HttpRequest object. How do I create this populated request object from within my code? For example, if I'm wi...

Posting a jaiku using xcode

NSMutableURLRequest *jaikuRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://api.jaiku.com/json"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; [jaikuRequest setHTTPM...

how to append a list in href url?

Hi All, I want to append a list in the url that is a href ,how can do so and how can i read it using request.getParameter() ? or a complete bean object in the url ? ...

Using HttpWebRequest to POST to a form on an outside server

I am trying to simulate a POST to a form on an external server that does not require any authentication, and capture a sting containing the resulting page. This is the first time I have done this so I am looking for some help with what I have so far. This is what the form looks like: <FORM METHOD="POST" ACTION="/controller" NAME="GIN"...

Why doesn't request.rawurl include the http://localhost part?

When I call Request.RawUrl I am not getting the domain name (at least in development). For example, if my url locally is: http://localhost:2343/some/thing The call to Request.RawUrl is giving me back: /some/thing I recall it returns everything, is this the behaviour b/c it is local dev? Update I am also using Url Re-Writing so thi...

Sending data with POST, issue with character encoding

I am having issues with my NSURLRequest and doing a POST whenever the string includes %, for example. On my website, I can see that the encoding is ISO-8859-1,utf-8 for Accept-Charset but for some reason I cannot get the POST to work if it includes "%&$" etc. It seems like it won't encode it with UTF-8 encoding. Am I doing something wro...

How to send a PUT/DELETE request in jQuery?

GET:$.get(..) POST:$.post().. What about PUT/DELETE? ...

.NET: What's the difference between HttpMethod and RequestType of HttpRequest?

The HttpRequest class defines two properties: HttpMethod: Gets the HTTP data transfer method (such as GET, POST, or HEAD) used by the client. public string HttpMethod { get; } The HTTP data transfer method used by the client. and RequestType: Gets or sets the HTTP data transfer method (GET or POST) used by the client...

Get host name without using HttpRequest

I'm want to run a "background job" in my ASP.NET application (periodically, as separate thread). And I need host name (DNS name or IP) to do my tasks. The problem - HttpContext.Current may be not available here (it's NULL). Is there any way to get a host name in not using HttpContext.Current.Request.Url.Host. ...

How does Request.IsAuthenticated work?

MSDN Code Sample Description: The following code example uses the IsAuthenticated property to determine whether the current request has been authenticated. If it has not been authenticated, the request is redirected to another page where users can enter their credentials into the Web application. This is a common technique used in the de...

Best way to manage long-running php script?

I have a PHP script that takes a long time (5-30 minutes) to complete. Just in case it matters, the script is using cUrl to scrape data from another server. This is the reason it's taking so long; it has to wait for each page to load before processing it and moving to the next. I want to be able to initiate the script and let it be unti...

Add HEADER in HTTP Request in Java

Hi, I'm using this following code to send simple HTTP Request : try { Socket s = new Socket (); s.bind (new InetSocketAddress (ipFrom, 0)); s.connect (new InetSocketAddress (ipTo, 80), 1000); PrintWriter writer = new PrintWriter (s.getOutputStream ()); BufferedReader reader = new BufferedReader (new I...

Redirecting Request (nsiHttpChannel?) in Firefox Extensions

I've been trying at this for a long time now, and no good results. var myObserver = { observe: function(subject, topic, data) { if (topic == "http-on-examine-response") { // implement later } else if(topic == "http-on-modify-request") { // implement later } }, QueryInterface : function (id) { if (id.equ...

HttpWebRequest Timeout (Hangs) Help

Hi All, I was wondering if you can help me with a bug I ma having. I have a HTTP Manager I have created that helps me dealing with POSTing/GETing data from websites. It has worked fine until recently when I am trying to use a mixture of both. First loop round everything works, on the second loop it hangs on HttpWebRequest.GetRequestStrea...

jQuery Ajax HTTP Request INTO a click function - not working

Hello everyone! My question is: Is it possible to do an Ajax request WITHIN a click function, with jQuery? (see example below), If so, what am I doing wrong? Because I'm not being able to do any request (I'm alerting the data through my success function and nothing is being retrieved). Thank you very much in advance for any help! :) ...

Can you set http headers when using HttpRequest object in Silverlight?

I'm having trouble setting any HTTP header values when making a HttpRequest from Silverlight 3.0? Are HTTP Headers supported in Silverlight 3.0? The following code throws an exception when the request callback is called: var url = new Uri("http://lonmw32795/RBSM_Portal_RESTfulWebService/HostInterrogationService.svc/host/enviro...