@Test public void testFetchInvaildOptions() throws Exception{ IWXHttpAdapter adapter = new IWXHttpAdapter() { @Override public void sendRequest(WXRequest request, OnHttpListener listener) { listener.onHttpFinish(successResponse()); } }; WXStreamModule streamModule = new WXStreamModule(adapter); Callback cb = new Callback(); streamModule.fetch("",cb,null); assert !(boolean)cb.mData.get("ok"); }
@JSMethod(uiThread = false) public void fetch(JSONObject optionsObj , final JSCallback callback, JSCallback progressCallback){ fetch(optionsObj, callback, progressCallback, mWXSDKInstance.getInstanceId(), mWXSDKInstance.getBundleUrl()); }
WXStreamModule extends WXModule { @JSMethod(uiThread = false) public void fetch(JSONObject optionsObj , final JSCallback callback, JSCallback progressCallback){ fetch(optionsObj, callback, progressCallback, mWXSDKInstance.getInstanceId(), mWXSDKInstance.getBundleUrl()); } }
WXStreamModule extends WXModule { @JSMethod(uiThread = false) public void fetch(JSONObject optionsObj , final JSCallback callback, JSCallback progressCallback){ fetch(optionsObj, callback, progressCallback, mWXSDKInstance.getInstanceId(), mWXSDKInstance.getBundleUrl()); } WXStreamModule();  WXStreamModule(IWXHttpAdapter adapter); }
WXStreamModule extends WXModule { @JSMethod(uiThread = false) public void fetch(JSONObject optionsObj , final JSCallback callback, JSCallback progressCallback){ fetch(optionsObj, callback, progressCallback, mWXSDKInstance.getInstanceId(), mWXSDKInstance.getBundleUrl()); } WXStreamModule();  WXStreamModule(IWXHttpAdapter adapter); @Deprecated @JSMethod(uiThread = false) void sendHttp(JSONObject paramsObj, final String callback); @JSMethod(uiThread = false) void fetch(JSONObject optionsObj , final JSCallback callback, JSCallback progressCallback); void fetch(JSONObject optionsObj , final JSCallback callback, JSCallback progressCallback, String instanceId, String bundleURL); }
WXStreamModule extends WXModule { @JSMethod(uiThread = false) public void fetch(JSONObject optionsObj , final JSCallback callback, JSCallback progressCallback){ fetch(optionsObj, callback, progressCallback, mWXSDKInstance.getInstanceId(), mWXSDKInstance.getBundleUrl()); } WXStreamModule();  WXStreamModule(IWXHttpAdapter adapter); @Deprecated @JSMethod(uiThread = false) void sendHttp(JSONObject paramsObj, final String callback); @JSMethod(uiThread = false) void fetch(JSONObject optionsObj , final JSCallback callback, JSCallback progressCallback); void fetch(JSONObject optionsObj , final JSCallback callback, JSCallback progressCallback, String instanceId, String bundleURL); static final String STATUS_TEXT; static final String STATUS; }