Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中转HTTP请求,解决跨域问题bug #3826

Closed
xiaolinVV opened this issue Jun 25, 2022 · 2 comments
Closed

中转HTTP请求,解决跨域问题bug #3826

xiaolinVV opened this issue Jun 25, 2022 · 2 comments

Comments

@xiaolinVV
Copy link

版本号:

3.2.0

问题描述:

中转HTTP请求,解决跨域问题:/sys/common/transitRESTful 中查询参数对象 variables 参数不为 null ,但是参数为空,导致 RestUtil.request 中 拼接 url 参数发生异常。

截图&代码:

image

variables 不为 null 但是参数为空时,会报如下异常:

image

建议修改如下,增加参数不为空校验:

// 拼接 url 参数
        if (variables != null && variables.size() != 0) {
            url += ("?" + asUrlVariables(variables));
        }

友情提示(为了提高issue处理效率):

  • 未按格式要求发帖,会被直接删掉;
  • 请自己初判问题描述是否清楚,是否方便我们调查处理;
  • 针对问题请说明是Online在线功能(需说明用的主题模板),还是生成的代码功能;
  • 描述过于简单或模糊,导致无法处理的,会被直接删掉;
@zhangdaiscott
Copy link
Member

jl

@sjlei
Copy link

sjlei commented Jun 27, 2022

问题已修复,下版本发布

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants