You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by xing zhang <zh...@gmail.com> on 2017/11/30 09:16:26 UTC
customize request when download bundle js in weex
Hi all,
According to my observation, you can specify a URL or js content to
render a page, for URL , then WeexSDK build a request for download the
resource and pour into the engine to
render. But in most case, we need customize a request for downloading a
resource, and we can setup our request userAgent and headers, our server
can receive these header to
customize response for a request from a device.
As for this we can expose a `renderWithRequest` interface for
WXSDKInstance, is this way convenient ?
comments? please
Re: customize request when download bundle js in weex
Posted by 陈泽峰 <ch...@ymt360.com>.
In my practice(android), renderByUrl() is not used. JSBundles are all downloaded by okhttp and weexsdk just render local templete,in this way,i can handle weex cache,and the request header can be customized too.
------------------ Original ------------------
From: "杨 劭君"<sh...@outlook.com>;
Date: Thu, Nov 30, 2017 07:55 PM
To: "Weex问题列表"<de...@weex.incubator.apache.org>;
Subject: Re: customize request when download bundle js in weex
+1, customize request header is useful
在 2017/11/30 17:19,“Adam Feng”<cx...@gmail.com> 写入:
+1, adding custom header (such as cookie) to request is useful, it should be supported both on iOS and Android.
Thanks.
Adam Feng
On 30 Nov 2017, 5:16 PM +0800, xing zhang <zh...@gmail.com>, wrote:
> Hi all,
>
> According to my observation, you can specify a URL or js content to
> render a page, for URL , then WeexSDK build a request for download the
> resource and pour into the engine to
>
> render. But in most case, we need customize a request for downloading a
> resource, and we can setup our request userAgent and headers, our server
> can receive these header to
>
> customize response for a request from a device.
>
> As for this we can expose a `renderWithRequest` interface for
> WXSDKInstance, is this way convenient ?
>
> comments? please
Re: customize request when download bundle js in weex
Posted by 杨 劭君 <sh...@outlook.com>.
+1, customize request header is useful
在 2017/11/30 17:19,“Adam Feng”<cx...@gmail.com> 写入:
+1, adding custom header (such as cookie) to request is useful, it should be supported both on iOS and Android.
Thanks.
Adam Feng
On 30 Nov 2017, 5:16 PM +0800, xing zhang <zh...@gmail.com>, wrote:
> Hi all,
>
> According to my observation, you can specify a URL or js content to
> render a page, for URL , then WeexSDK build a request for download the
> resource and pour into the engine to
>
> render. But in most case, we need customize a request for downloading a
> resource, and we can setup our request userAgent and headers, our server
> can receive these header to
>
> customize response for a request from a device.
>
> As for this we can expose a `renderWithRequest` interface for
> WXSDKInstance, is this way convenient ?
>
> comments? please
Re: customize request when download bundle js in weex
Posted by Adam Feng <cx...@gmail.com>.
+1, adding custom header (such as cookie) to request is useful, it should be supported both on iOS and Android.
Thanks.
Adam Feng
On 30 Nov 2017, 5:16 PM +0800, xing zhang <zh...@gmail.com>, wrote:
> Hi all,
>
> According to my observation, you can specify a URL or js content to
> render a page, for URL , then WeexSDK build a request for download the
> resource and pour into the engine to
>
> render. But in most case, we need customize a request for downloading a
> resource, and we can setup our request userAgent and headers, our server
> can receive these header to
>
> customize response for a request from a device.
>
> As for this we can expose a `renderWithRequest` interface for
> WXSDKInstance, is this way convenient ?
>
> comments? please
Re: customize request when download bundle js in weex
Posted by "方曦(千之)" <fa...@alibaba-inc.com>.
Yeath,I am very agree with this case.
And in some scenarios, this feature is very much needed.
+1.
> 在 2017年11月30日,17:16,xing zhang <zh...@gmail.com> 写道:
>
> Hi all,
>
> According to my observation, you can specify a URL or js content to
> render a page, for URL , then WeexSDK build a request for download the
> resource and pour into the engine to
>
> render. But in most case, we need customize a request for downloading a
> resource, and we can setup our request userAgent and headers, our server
> can receive these header to
>
> customize response for a request from a device.
>
> As for this we can expose a `renderWithRequest` interface for
> WXSDKInstance, is this way convenient ?
>
> comments? please