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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:00:14+00:00 2026-05-15T02:00:14+00:00

I have a resource /system/resource And I wish to ask the system a boolean

  • 0

I have a resource

  /system/resource

And I wish to ask the system a boolean question about the resource that can’t
be answered by processing on the client (i.e I can’t just GET the resource
and look through the actual resource data – it requires some processing
on the backend using data not available to the client). eg

  /system/resource/related/otherresourcename

I want this is either return true or false. Does anyone have any
best practice examples for this type of interaction?

Possibilities that come to my mind:

  • use of HTTP status code, no returned body (smells wrong)

  • return plain text string (True, False, 1, 0) –
    Not sure what string values are appropriate to use, and furthermore
    this seems to be ignoring the Accept media type and always returning
    plain text

  • come up with a boolean object for each of my support media types
    and return the appropriate type (a JSON document with a single boolean
    result, an XML document with a single boolean field). However this seems unwieldy.

I don’t particularly want to get into a long discussion about the true meaning of a
RESTful system etc – I have used the word REST in the title because it
best expresses the general flavour of system I am designing (even if perhaps I
am tending more towards RPC over the web rather than true REST). However, if
someone has some thoughts on how a true RESTful system avoids this problem
entirely I would be happy to hear them.

  • 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-15T02:00:15+00:00Added an answer on May 15, 2026 at 2:00 am

    I would think returning text/plain would be the cleanest option. As far as the accept header is concerned, if the client really can’t handle text plain, then you could revert to Json, or Xml.
    Personally, I would use the strings “true” and “false”. Most client languages can parse those strings to their appropriate value.

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

Sidebar

Related Questions

I have made a build system for my web application that's rewriting all resource
I have a C++ library that should expose some system\ resource calls as callbacks
I have couple resource DLLs that I currently load when application starts using following
I have a resource database where resources can belong to different locations. Users and
Consider that I have 1 resource and 2 urls (let's say new one and
Question in title pretty much sums it up. I have some resource object defined
I have a resource assembly that contains various strings, icons, and bitmaps that my
I have a resource that is quite large (over 100 MB). I would rather
I have one resource that is only a model: I am building a an
In an ideal RESTful API that supports multiple accounts, should each resource have it's

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.