http-method

Is it possible to implement X-HTTP-Method-Override in ASP.NET MVC?

I'm implementing a prototype of a RESTful API using ASP.NET MVC and apart from the odd bug here and there I've achieve all the requirements I set out at the start, apart from callers being able to use the X-HTTP-Method-Override custom header to override the HTTP method. What I'd like is that the following request... GET /someresource/1...

Ajax request not receiving xml from Django

I have a Django server which handles requests to a URL which will return some HTML for use in an image gallery. I can navigate to the URL and the browser will display the HTML that is returned, but I can't get that same HTML by doing an AJAX call (using jQuery) to the same URL. This is the view that generates the response: def gallery_...

How do the httppost, httpput etc attributes in ASP.NET MVC 2 work?

In ASP.NET MVC 2, a couple of new action filter attributes were introduced, as "shorthand" for attributes in ASP.NET MVC 1; for example, applying the HttpPostAttribute does the same thing as applying [AcceptVerbs(HttpVerbs.Post)] to an action method. In addition, with the more verbose syntax, it is possible to combine different methods,...

Overwrite HTTP method with JAX-RS

Today's browsers (or HTML < 5) only support HTTP GET and POST, but to communicate RESTful one need PUT and DELETE too. If the workaround should not be to use Ajax, something like a hidden form field is required to overwrite the actual HTTP method. Rails uses the following trick: <input name="_method" type="hidden" value="put" /> Is t...

Security: Brute-forcing GET-requests by URL?

Hi everybody, what should my concerns be if I we're about to make an application that handles logins the following way: http://api.myApp.example/printSomething/username/password/ How insecure is it compared to a normal login page that are based on POSTed user details (username+password)? Is there a difference? Thanks ...

REST/Rails questions - support for HTTP methods?

So I am getting this error for one of my routes. I'am running Rails v2.3.8 + Mongrel 1.1.5. Does rails support only GET & POST?? ActionController::MethodNotAllowed (Only get and post requests are allowed.): The route defined in my routes.rb is - map.connect "#{base_url}/r/:id/rate?v=:value&u=:user_id", :conditions => { :method => :pu...

HTTP method to represent "fire and forget" actions in RESTful service

Thinking about REST, it's relatively easy to map HTTP methods to CRUD actions: POST for create, GET for read, etc. But what about "fire and forget" actions? What HTTP method would best represent a fire and forget action such as triggering a batch job (in which no response is sent back to the caller)? POST would spring to mind, but I th...

What is the difference between POST and GET?

I've only recently been getting involved with PHP/AJAX/jQuery and it seems to me that an important part of these technologies is that of POST & GET. First, what is the difference between POST and GET? Through experimenting, I know that GET appends the returning variables and their values to the URL string but POST doesn't: website.com/...

Is There a Table That Shows HTTP Method Support by Browser

I've seen lots of stuff that generally say "not all browser support all HTTP methods" etc., but is there a nice table that shows specifically which HTTP methods are support that's broken down by browser? I see this previous question on SO but it's not the answer I'm looking for: http://stackoverflow.com/questions/3218053/fine-grained-re...

XHR doesn't work because "Origin is not allowed by Access-Control-Allow-Origin".

I'm working on a API-Server with Rails 3 wich is pretty handy so far but I'm running across a error all the time and I'm not sure wether it is because of my Apache Setup or the Rails App. When I try to do a HTTP DELETE or PUT request on http://sample.domain/uri/id via XHR, curl or HTTP-Client.app Rails or Apache responds with 404 or 403...