isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict Jabines <jabines...@gmail.com>
Subject Re: How to add an additional message in response? (RESTful)
Date Wed, 15 Nov 2017 08:14:59 GMT
Hi Andi,

I understand. Thanks.

On Wed, Nov 15, 2017 at 2:57 PM, Andi Huber <ahuber@apache.org> wrote:

> Hi Paul,
> validateXxx() is regarded by the framework as a so called
> 'support-method'. Depending on your use-case, you could consider to instead
> write a dedicated 'action-method' that returns a Base64 encoded JSON string
> according to your needs, which you then decode on your RESTful client side.
>
> However, I'm not too confident, that this Base64 trick is best practice.
>
> Regards, Andi
>
> On 2017-11-14 15:32, Paul Benedict Jabines <jabinespbi@gmail.com> wrote:
> > I have a validateXxx() where I return a message "Name already exist." for
> > some conditions. I believe the response can be a json object. So how to
> add
> > another key - value in the response?
> >
> > {
> >       ....
> >      "SomeMessage": "Name already exist."
> >       ....
> > }
> >
> > Thanks,
> > - Paul
> >
> > <https://www.avast.com/sig-email?utm_medium=email&utm_
> source=link&utm_campaign=sig-email&utm_content=webmail>
> > Virus-free.
> > www.avast.com
> > <https://www.avast.com/sig-email?utm_medium=email&utm_
> source=link&utm_campaign=sig-email&utm_content=webmail>
> > <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> >
>



-- 
- Paul

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message