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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:10:01+00:00 2026-05-28T07:10:01+00:00

I am designing an RESTful API for our product and have encountered the need

  • 0

I am designing an RESTful API for our product and have encountered the need for asynchronous actions. The recommendation from several books is to use the 202 response code and provide a link to the “status” of the action in the Location: header.

While trying to implement this in a Grails environment, developers recommended using Grails ability to create links automatically (docs here). The problem is that then an administrator has to define the grails.serverURL in a configuration (which is just one more thing to go wrong).

I proposed that we use the request to reflect back the appropriate URL by simply replacing the requested resource “/rest/foo” with the newly created “status” resource “/rest/bar/status-42”. Is it appropriate to use HttpServletRequest.getRequestURL() in this way? If so, can you comment on the reliability of getRequestURL() (I’ve heard disturbing reports)? If not, why not, and any other suggestions?

  • 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-05-28T07:10:02+00:00Added an answer on May 28, 2026 at 7:10 am

    It is not bad form. I have no evidence to back this up but the absence of people of people screaming, “NO! NO! Anything but THAT!” and the javadocs I linked to. I’ll reply back here and change my answer if it turned out to be a bad idea 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When designing a RESTful API that uses a datastore that makes use of auto-generated
Designing my RESTful API, I would like use following URI http://[HOST]/[PLANET]/[LAT];[LONG] e.g. http://myserver/earth/50.2;29.1 What
I am designing a Restful HTTP API and have a design question. In my
We're designing the URL structure for our web app and want to use RESTful,
I am designing RESTful Api's and would like some advice on designing an API
I am designing a RESTful API and I would like to know what the
I'm currently (I try to) designing a RESTful API for a social network. But
I am designing a restful HTTP API for my application. The app has Categories
We're in the early stages of designing a RESTful/resource-oriented web service API for a
I am designing a RESTful API for a booking application and was quite happy

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.