Re: [Dev] AppFactory REST API HTTP method mis match

2014-07-21 Thread Samith Dassanayake
Hi Udara,

It is implemented as POST.  As a general rule, the idea of a GET in REST is
that any of your parameters are sent in the URL. As you can see all of
these methods required complex data and those are passed as body. Therefore
these methods are implemented as POST instead of GET.

Thanks


On Mon, Jul 21, 2014 at 12:32 PM, Udara Liyanage ud...@wso2.com wrote:

 Hi,

 HTTP method of the below APIs should be GET according to general REST
 guides. However they are mentioned [1] as POST. Is this a documentation
 error or is it implemented as POST?


- getApplicationsOfUser
- getAppInfo
- getAllAppVersionsInStages
- getAppVersionsInStage
- getLatestBuildSuccessInfo
- isApplicationKeyAvailable
- getBuildLogsUrl



 [1] https://docs.wso2.com/display/AF200/REST+APIs

 --

 Udara Liyanage
 Software Engineer
 WSO2, Inc.: http://wso2.com
 lean. enterprise. middleware

 web: http://udaraliyanage.wordpress.com
 phone: +94 71 443 6897

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Best Regards

Samith Dassanayake
Software Engineer, WSO2 Inc.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] AppFactory REST API HTTP method mis match

2014-07-21 Thread Udara Liyanage
Hi Samita,

In REST world GET is used to fetch resources and POST is used to create a
resource. So using POST only to fetch resources is a violation if REST
convention.


Touched, not typed. Erroneous words are a feature, not a typo.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] AppFactory REST API HTTP method mis match

2014-07-21 Thread Harsha Thirimanna
Hi Samita,

Yes, as Udara said that is the standard of REST [1]. In that case, there
may be some more changes in our REST API for other operation also as this
standard. Better to discuss with the team whether this is possible to
change right now.


[1] http://www.restapitutorial.com/lessons/httpmethods.html

thanks


*Harsha Thirimanna*
Senior Software Engineer; WSO2, Inc.; http://wso2.com
* http://www.apache.org/*
* email: **hars...@wso2.com* az...@wso2.com* cell: +94 71 5186770  , +94 *
*774617784 twitter: **http://twitter.com/ http://twitter.com/afkham_azeez*
*harshathirimann linked-in: **http:
http://lk.linkedin.com/in/afkhamazeez**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122
http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122*

 *Lean . Enterprise . Middleware*



On Mon, Jul 21, 2014 at 5:56 PM, Udara Liyanage ud...@wso2.com wrote:


 Hi Samita,

 In REST world GET is used to fetch resources and POST is used to create a
 resource. So using POST only to fetch resources is a violation if REST
 convention.


 Touched, not typed. Erroneous words are a feature, not a typo.

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev