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 8343885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:12:11+00:00 2026-06-09T06:12:11+00:00

In a RESTful application, how do we differentiate between an action and an HTTP

  • 0

In a RESTful application, how do we differentiate between an “action” and an HTTP verb (GET, POST, PUT, DELETE)?

For example, as I understand it, a GET request to the resource /products should return a list of all products. A POST request to /products should create a new product. How, then, does the user request the original form which is used to create the product? My initial response would have been a GET request to the same URI, but as mentioned above, that should return a list of all products – not a blank form for creating a product.

In most frameworks I’ve researched, this problem is solved by making the “action” part of the URI. For example, a POST request to /products/create would create a new product, whereas a GET request to /products/create would give the blank form for creating a product. To get a list of all products would be a GET request to either /products or /products/get, /products/read, etc. depending on the framework in question. This approach resolves the ambiguity above, but it conflicts with what I’ve read about traditional REST design.

  • 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-09T06:12:12+00:00Added an answer on June 9, 2026 at 6:12 am

    IMHO, the best option is to make the request method a part of controller’s action.

    Lets say you are accessing http://who.cares/product/42 or http://who.cares/product/42/specification . This query to webserver would translate as Product controller. The actions name should be created by combining request method and command:

    DELETE "http://who.cares/product/42"
    
        controller: "Product", 
        action:     "deleteProduct()" 
    
    
    GET "http://who.cares/product/42/details"
    
        controller: "Product", 
        action:     "getDetails()"
    
    
    POST "http://who.cares/product/42/review"
    
        controller: "Product", 
        action:     "postReview()"
    
    
    GET "http://who.cares/products/ 
    
        controller: "Products", 
        action:     "getProducts()"
    
    
    POST "http://who.cares/products/ 
    
        controller: "Products", 
        action:     "postProducts()"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a RESTful application, there's no state maintained between two requests. Each request is
I am developing RESTful API for my application. All getters (that use HTTP GET)
I'm working on a RESTful web application (Django+Piston). The POST request sends data encoded
This post if a follow-up question to mt previous post: Android RESTful Web application
I am designing a restful HTTP API for my application. The app has Categories
I have a RESTful Rails application with a resource called Foo. I'm trying to
I have this action in my RESTful application on MVC3: [HttpPut] public void Rest(ViewModel
I'm making an attempt at a RESTful application but my $.ajax function stops in
I have a Maven 2 RESTful application using Jersey/JAXB. I generate the JAXB beans
I am new to Guice. I want to create a server application with RESTful

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.