Re: Shouldn't apisix provide a unified function to format theresponse body?

2020-04-23 Thread jie123108
> >{error_msg: 'error message’} > > >I think this style should be enough. >The `code` is meaningless, I do not > >like it. >The `code` is meaningless too. >most of case: >{ok = true} >{ok = > >false, error_msg = ""} >so we can drop `ok`, it is meaningless. What I'm trying to say is

Re: Hopefully, APISIX will enable the management of static resources

2020-04-23 Thread YuanSheng Wang
Talk about my thoughts: It is a standard feature to help microservices accelerate access to static files as an API gateway. The question is how? 1. client-> gateway (proxy cache)-> microservice 2. client-> gateway (static)-> microservice Of these two cases, case 2 seems to be better. Because it

Re: Shouldn't apisix provide a unified function to format theresponse body?

2020-04-23 Thread YuanSheng Wang
On Thu, Apr 23, 2020 at 3:38 PM jie123108 wrote: > > > >{error_msg: 'error message’} > > > > >I think this style should be enough. >The `code` is meaningless, I do > not like it. >The `code` is meaningless too. >most of case: >{ok = true} > >{ok = false, error_msg = ""} >so we can dro

Re: Shouldn't apisix provide a unified function to format theresponse body?

2020-04-23 Thread Ming Wen
you can refer to the response rewrite plugin[1]. [1] https://github.com/apache/incubator-apisix/blob/master/doc/plugins/response-rewrite.md Thanks, Ming Wen, Apache APISIX & Apache SkyWalking Twitter: _WenMing jie123108 于2020年4月23日周四 下午3:38写道: > > > >{error_msg: 'error message’} > > >