Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7928257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:41:16+00:00 2026-06-03T19:41:16+00:00

I have a RESTful Play 2.0 application, and I’d like to call DELETE /sessions

  • 0

I have a RESTful Play 2.0 application, and I’d like to call DELETE /sessions from a link in the browser.

How do I do this? Rails has a convention of using a _method query parameter for non-GET/POST requests, but Play’s documents don’t mention this.

Also, do I have to create a separate form or XMLHttpRequest in order to invoke the method from a link’s href or is there something like Rails’s data-method attribute?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:41:17+00:00Added an answer on June 3, 2026 at 7:41 pm

    You will not do that with common link.

    Cite from similar topic on Google Groups:

    A link (A tag) is not intended to work with DELETE method. The semantic
    of a link is to “link” to another resource, which can be retrieve
    using a GET request. You can do DELETE requests in Ajax, or in form
    using a POST method and containing an hidden input with name
    “X-HTTP-Method-Override” and value “DELETE”.

    What is that mean: you need use GET to delete the item:

    in conf/routes:

    GET   /delete/:itemId    controllers.Application.deleteItem(itemid : Long)
    

    in your view:

    <a href="@routes.Application.deleteItem(item.id)">Delete @item.name</a>
    

    Or with AJAX call:

    <script type="text/javascript">
        $.ajax({
            url:"@routes.Application.actionToDeleteSomething()",
            type:"DELETE"
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a RESTful API serving JSON. I'm calling it like this: - (void)viewDidLoad
I have a RESTful WCF service with a method declared like this: [OperationContract(Name =
I have a RESTful resource in my Rails app called Photo. I'm using Paperclip
I have a ReSTful web service which needs to parse locale-sensitive data from the
I would like to use RESTful services in a CDI/JSF2 application. I am not
Right now I'm using Controller_Template would like to have RESTful URLs though, is it
Previously i have used restful wcf webservices to get the data from server.But now
I have RESTful API written on RoR 3. I have to make my application
I have a RESTful service running on azure. Currently, it has zero persistence. (It
I have a RESTful web service and I want to access it from Android.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.