# RestFul webservice

**URL:** <https://forum.servoy.com/t/restful-webservice/16830>\
**Category:** Classic Servoy\
**Created:** [December 8, 2012, 5:05pm UTC](https://forum.servoy.com/t/restful-webservice/16830 "2012-12-08T17:05:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adelo\_Herrero](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Adelo\_Herrero](https://forum.servoy.com/u/Adelo_Herrero)\
**Post date:** [December 8, 2012, 5:05pm UTC](https://forum.servoy.com/t/restful-webservice/16830/1 "2012-12-08T17:05:18Z")

</div>

Hi all:

I have one webservice with restful and its work fine, but I have a question.

I tested this solution from web browser (Firefox) and the utility “restclient” ([Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/rest-client)) by GET method.

From Firefox, I get the response in XML, but from restclient it is in JSON.

I tested different parameters in the header with the same result.

Any idea?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [December 8, 2012, 6:02pm UTC](https://forum.servoy.com/t/restful-webservice/16830/2 "2012-12-08T18:02:14Z")

</div>

Yes: use Velocity and call a form adding a “.json” extension to it, or a “.xml” extension to it depending on what you want.  
[https://www.servoyforge.net/projects/ve … /WebClient](https://www.servoyforge.net/projects/velocity-report/wiki/WebClient)

---

<div class="post-metadata">

**Author:** ![Adelo\_Herrero](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Adelo\_Herrero](https://forum.servoy.com/u/Adelo_Herrero)\
**Post date:** [December 8, 2012, 10:39pm UTC](https://forum.servoy.com/t/restful-webservice/16830/3 "2012-12-08T22:39:55Z")

</div>

Thanks for the reply.

Best regards.,

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [December 11, 2012, 9:45am UTC](https://forum.servoy.com/t/restful-webservice/16830/4 "2012-12-11T09:45:02Z")

</div>

Adelo,

The rest-ws plugin looks at the Accept request header of the request to check which result format to send in the response.  
It supports application/json, application/xml and binary and defaults to json (when no Accept header is found or no supported type).

Rob

---

<div class="post-metadata">

**Author:** ![Adelo\_Herrero](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Adelo\_Herrero](https://forum.servoy.com/u/Adelo_Herrero)\
**Post date:** [December 11, 2012, 11:28am UTC](https://forum.servoy.com/t/restful-webservice/16830/5 "2012-12-11T11:28:52Z")

</div>

I understand, thanks.
