http

how to query restful rails app with curl?

here's my problem.. resource: user method: create I call curl like this: curl -X POST -H 'Content-type: text/xml' -d '<xml><login>john</login><password>123456</password></xml>' http://0.0.0.0:3000/users but the params hash in rails look like this: {"xml"=> {"login"=>"luca", "password"=>"123456"}} I want it to look like this: {"lo...

Serializing an object into the body of a WCF request using webHttpBinding

I have a WCF service exposed with a webHttpBinding endpoint. [OperationContract(IsOneWay = true)] [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "/?action=DoSomething&v1={value1}&v2={value2}")] void DoSomething(string value1, string value2, MySimpleObject ...

Does VisualSVN Server 3 support HTTP compression?

Does anyone know if version 3 of VisualSVN server supports HTTP compression? It was in 2.0 then dropped in 2.0.4 and I thought it was meant to be incorporated back into 3 but now can’t find any references (Visual SVN is very light on documentation). ...

Is HTTP POST request allowed to send back a response body?

As per the HTTP specification: If a resource has been created on the origin server, the response SHOULD be 201 (Created) and contain an entity which describes the status of the request and refers to the new resource, and a Location header (see section 14.30). Does this mean that POST request should always send ...

Load Webpage with login in java

Hi community, I have a webpage http:/ /www.somesite.de This webpage gives me a file I want to download, but before I can do it I have to login with a username and a password. Can anyone tell me where I have to look for best practices for such a problem? Thanks in advance Sebastian ...

File.lastModified() returns stale date on Google App Engine

So recently I learned that in order to serve static files with a Last-Modified header from Google App Engine, I had to write my own (simple) servlet to do that. OK fine, I went and did it, results can be viewed here. But now I find that File.lastModified() is always returning the same value, no matter that I have touched the file, even...

Accept Header and HTTP DELETE in Rails App

If a server always responds with 204 after a successful HTTP DELETE, when is it appropriate to require clients to send an Accept header? It seems like the correct behavior would be to never require an Accept header. The reason I ask is that when developing a RESTful Rails application, if the Accept header is unset, Rails defaults to HT...

Can't the browser just use its cache from prior ajax calls?

I am trying to rely upon the browser cache to hold JSON data returned from AJAX calls in jQuery. Normal browser activity relies upon the browser cache all the time. Example: jpg and gif images are not refetched on a page reload. But when I try using jQuery getJSON ajax calls, I cannot seem to avoid fetching the data from the server. M...

Is an HTTP PUT request required to include a body?

I'm having trouble finding a definite specification of this in the standard. I have an HTTP client that's not including a 'Content-Length: 0' header when doing a PUT request where I don't specify a body, and a server that gets confused by such requests, and I'm wondering which program I should be blaming. ...

Maintaining simultaneous connections in HTTP?

I need to maintain multiple active long-pooling AJAX connections to the Webserver. I know that most browsers don't allow more then 2 simultaneous connections to the same server. This is what the HTTP 1.1 protocol states: Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maint...

http request on event with (jQuery?)

I have a select form, with a few option values, and I want the page to reload when someone selects another option value, without having a submit button that is. Just reload the page when someone change the value. I would like to skip fetching the data with an AJAX request. So the idea here is to call a HTTP-request when the option value ...

How to store header info in a custom WCF HTTP binding

Hi there, Basically, I want to get HTTP requests from a different source than a listening socket. However, since the provided bindings don't offer support for this, I am currently building my own binding. My current binding consists of the WebMessageEncoder and of a custom TransportBindingElement, which references a custom ChannelListe...

Tortoise svn Subversion Update Error

Hey All, I recently was working on an open source project... Everything was going great for a week or two but them something happened and I don't know what, and I can't update anymore! I know the url is correct, because I can check it out on my linux server... but when I try to check it out with tortoise svn on my windows box it doesn...

Asynchronous HTTP requests in PHP

Is there any sane way to make a HTTP request asynchronously in PHP without throwing out the response? I.e., something similar to AJAX - the PHP script initiates the request, does it's own thing and later, when the response is received, a callback function/method or another script handles the response. One approach has crossed my mind - ...

web server sending command to a J2ME app

Can a J2ME app be triggered by a message from a remote web server. I want to perform a task at the client mobile phone as soon as the J2ME app running on it receives this message. I have read of HTTP connection, however what I understand about it is a client based protocol and the server will only reply to client requests. Any idea if ...

Java HttpConnection refused, but curl equivalent works

I'm losing my mind on this one. My curl command works: curl http://testuser:testpwd@qabox3:8501/xmlcontroller But, when I try what looks like an equivalent http connection in Java it gives "connection refused". What am I missing? I've tried a dozen flavors of trying to make this connection today and am out of ideas. URL url = ...

HTTP Chunked transfer encoding: How do you send "\r\n"?

Say the body I'm trying to send via chunked encoding includes "\r\n", how do I avoid that being interpreted as the chunk delimeter? e.g. "All your base are\r\n belong to us" http://en.wikipedia.org/wiki/Chunked_transfer_encoding ...

How to do Http Video Streaming PHP or an referece site to do this?

In one of my project i have a requirement for live or on demand video streaming. I am using PHP and AJAX for this project so i want to know how to do Http Video Streaming PHP or an referece site to do this. ...

Oracle: How to execute an insert trigger without delaying the insert response?

The trigger below is delaying my insert response. How can I prevent this? create or replace TRIGGER GETHTTPONINSERT BEFORE INSERT ON TABLENAME FOR EACH ROW Declare -- BEGIN -- The inserted data is transfered via HTTP to a remote location END; EDIT People are telling me to do batch jobs, but I would rather have the data earlier...

Jersey - Redirection Using Get Not Put, Causes Redirection Loop

Hello chaps, I'm working on a web app that uses Jersey. I'm trying to implement a get-after-post sort of thing using a URIBuilder and a seeOther response. The aim is to redirect to the same URI the browser is already on, but to force a GET. It works a bit like this: Request comes in via PUT PUT request processed SeeOther response retu...