Hi Shan,

Shouldn't we add functions like onPut() , onDelete() for other HTTP methods
like PUT, DELETE?

Thanks

On Wed, Jan 25, 2017 at 10:27 AM, Shan Mahanama <[email protected]> wrote:

> Hi all,
>
> This change has been implemented and available in UUF Core 1.0.0-m11 [1]
> version.
>
> [1] https://github.com/wso2/carbon-uuf/releases/tag/v1.0.0-m11
>
> Thanks,
> Shan.
>
> On Mon, Jan 23, 2017 at 12:37 PM, Shan Mahanama <[email protected]> wrote:
>
>> Hi all,
>>
>> We are introducing *onGet*(for GET requests), *onPost*(for POST request)
>> server side JS functions to the UUF as discussed in the mail thread [1].
>> Hence the *onRequest* function will be deprecated.
>>
>> function onGet(env) {
>>     // do stuff for a GET request, env variable is same as before
>> }
>>
>>
>> function onPost(env) {
>>     // do stuff for a POST request, env variable is same as before
>> }
>>
>>
>>    - If you are only handling GET requests in the server side, only
>>    adding onGet function is enough.
>>    - If you are only handling POST requests in the server side, only
>>    adding onPost function is enough.
>>    - If you are handling both GET and POST requests in the server side,
>>    both onGet, onPost functions need to be added.
>>
>> Please note that in the server side JS file, you need to specify* at
>> least one *of these functions. Please refer samples [2] for any
>> clarification.
>>
>> [1] Document onRequest() method in the UUF developer's guide
>> [2] https://github.com/wso2/carbon-uuf/tree/master/samples/
>> apps/org.wso2.carbon.uuf.sample.pets-store.app/src/main/pages
>>
>> Thanks,
>> Shan.
>>
>> --
>> Shan Mahanama
>>
>> Software Engineer, WSO2 Inc. http://wso2.com
>> <http://l.facebook.com/l.php?u=http%3A%2F%2Fwso2.com&h=gAQEswASa>
>> Email: [email protected]
>> Mobile: +94 71 2000 498
>>
>>
>>
>
>
> --
> Shan Mahanama
>
> Software Engineer, WSO2 Inc. http://wso2.com
> <http://l.facebook.com/l.php?u=http%3A%2F%2Fwso2.com&h=gAQEswASa>
> Email: [email protected]
> Mobile: +94 71 2000 498
>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Lakshman Udayakantha
WSO2 Inc. www.wso2.com
lean.enterprise.middleware
Mobile: *0717429601*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to