Hi Jaggery Team,

Actually the reason is,
the endpoint im calling doesnt return anything as response. Just '204 No
Content'

Since the response is empty/null, it returns a null pointer exception.
IMO no content responses also should be handled by hostobject.
Is this fixed now?
Im using *org.jaggeryjs.hostobjects.xhr_0.9.0.ALPHA4_wso2v1.jar*

On Wed, Jan 25, 2017 at 7:00 PM, Mahesh Chinthaka <[email protected]> wrote:

> Even though this error occurs, http call happens succesfully. That is
> weird.
>
> On Wed, Jan 25, 2017 at 6:58 PM, Mahesh Chinthaka <[email protected]>
> wrote:
>
>>
>> Hi all,
>>
>> Im using jaggery post to a http post call.
>> I dont need to set the headers, type and data as per my use case
>> when I use like below,
>>
>>  var result = post(url);
>>
>> It throws following error.
>>
>> Caused by: java.lang.NullPointerException
>>
>> at org.jaggeryjs.hostobjects.xhr.XMLHttpRequestHostObject.execu
>> teRequest(XMLHttpRequestHostObject.java:527)
>>
>> at org.jaggeryjs.hostobjects.xhr.XMLHttpRequestHostObject.send(
>> XMLHttpRequestHostObject.java:515)
>>
>> at org.jaggeryjs.hostobjects.xhr.XMLHttpRequestHostObject.jsFun
>> ction_send(XMLHttpRequestHostObject.java:279)
>>
>> at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
>>
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>>
>> at java.lang.reflect.Method.invoke(Method.java:606)
>>
>> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
>>
>> Any idea please ?
>>
>> --
>> *Mahesh Chinthaka Vidanagama* | Software Engineer
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
>> Email: [email protected] | Web: www.wso2.com
>>
>
>
>
> --
> *Mahesh Chinthaka Vidanagama* | Software Engineer
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
> Email: [email protected] | Web: www.wso2.com
>



-- 
*Mahesh Chinthaka Vidanagama* | Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345
Email: [email protected] | Web: www.wso2.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to