Re: [Resteasy-users] POST Request URL Pattern

2013-02-01 Thread Bill Burke
Its ok to use query parameters as long as they are part of the identity 
of the resource.  IMO, don't use them to modify a resource.  Instead 
pass a representation with your POST.

On 2/1/2013 3:34 AM, Denica Gencheva wrote:
> On 01/02/2013, Nuwan Bandara  wrote:
>> Hi,
>>
>> I have a RESTeasy web service. It accept POST requests. As an example
>> client will call the web service like this
>>
>> http://localhost:8080/n-tweb-comm-war/ws/updateResultIndicator;accessionNumber=1;analyteCode=2;workstation=3;siteCode=4;testIndicator=5;testStatus=66
>>
>> My question;
>>
>> 1. is this a proper way to call POST web service?
>> 2. if not how should I design the URL for a POST request?
>>
>> Thanks,
>> Nuwan
>>
>
> Hi,
> 1. If you mark the web service as @POST and the parametes as
> @FormParam (as it should be in a POST service) - no, this is not
> correct.
> 2. The proper way is to put the parameters in the body. To do that you
> can use for example curl (http://curl.haxx.se/) : curl
> "http://localhost:8080/n-tweb-comm-war/ws/updateResultIndicator"; -d
> "accessionNumber=1&analyteCode=2&workstation=3&siteCode=4&testIndicator=5&testStatus=66"
> or some browser add like
> "https://addons.mozilla.org/en-US/firefox/addon/poster/";.
>
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_jan
> ___
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] POST Request URL Pattern

2013-02-01 Thread Denica Gencheva
On 01/02/2013, Nuwan Bandara  wrote:
> Hi,
>
> I have a RESTeasy web service. It accept POST requests. As an example
> client will call the web service like this
>
> http://localhost:8080/n-tweb-comm-war/ws/updateResultIndicator;accessionNumber=1;analyteCode=2;workstation=3;siteCode=4;testIndicator=5;testStatus=66
>
> My question;
>
>1. is this a proper way to call POST web service?
>2. if not how should I design the URL for a POST request?
>
> Thanks,
> Nuwan
>

Hi,
1. If you mark the web service as @POST and the parametes as
@FormParam (as it should be in a POST service) - no, this is not
correct.
2. The proper way is to put the parameters in the body. To do that you
can use for example curl (http://curl.haxx.se/) : curl
"http://localhost:8080/n-tweb-comm-war/ws/updateResultIndicator"; -d
"accessionNumber=1&analyteCode=2&workstation=3&siteCode=4&testIndicator=5&testStatus=66"
or some browser add like
"https://addons.mozilla.org/en-US/firefox/addon/poster/";.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] POST Request URL Pattern

2013-01-31 Thread Adrian Rodriguez
I would do something like

http://localhost//results/

Post your data as URL form encoded data. Any client should do this for you
with a setParameter("accessionNumber", 1) style call. Your resources should
take those params as @FormParam("accessionNumber") Long accessionNumber

If the call is meant to update values instead generating a new record then
change @POST to @PUT

Sent from my iPhone

On Jan 31, 2013, at 3:09 PM, Nuwan Bandara  wrote:

Hi,

I have a RESTeasy web service. It accept POST requests. As an example
client will call the web service like this

http://localhost:8080/n-tweb-comm-war/ws/updateResultIndicator;accessionNumber=1;analyteCode=2;workstation=3;siteCode=4;testIndicator=5;testStatus=66

My question;

   1. is this a proper way to call POST web service?
   2. if not how should I design the URL for a POST request?

Thanks,
Nuwan

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan

___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


[Resteasy-users] POST Request URL Pattern

2013-01-31 Thread Nuwan Bandara
Hi,

I have a RESTeasy web service. It accept POST requests. As an example
client will call the web service like this

http://localhost:8080/n-tweb-comm-war/ws/updateResultIndicator;accessionNumber=1;analyteCode=2;workstation=3;siteCode=4;testIndicator=5;testStatus=66

My question;

   1. is this a proper way to call POST web service?
   2. if not how should I design the URL for a POST request?

Thanks,
Nuwan
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users