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

post请求表单传参,参数urlEncod时中文无法匹配 #656

Open
zhangjianhd opened this issue Sep 16, 2020 · 1 comment
Open

post请求表单传参,参数urlEncod时中文无法匹配 #656

zhangjianhd opened this issue Sep 16, 2020 · 1 comment

Comments

@zhangjianhd
Copy link

zhangjianhd commented Sep 16, 2020

Android端
版本3.2.0
问题:post请求表单传参,参数urlEncod
有中文时通过

//DokitUtil.java
public static String requestBodyToString(RequestBody requestBody) {
        try {
            Buffer buffer = new Buffer();
            requestBody.writeTo(buffer);
            return buffer.readUtf8();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return "";
    }

这个方法取到的String没有urldecod
导致isMockMatched()方法返回的是false
无法匹配

这种情况如何处理,现在匹配规则都是库里写死了

@zhangjianhd zhangjianhd changed the title post请求表单传参,参数是中文无法匹配 post请求表单传参,参数urlEncod时中文无法匹配 Sep 17, 2020
@jtsky
Copy link
Collaborator

jtsky commented Sep 23, 2020

我们会在下个版本对这里进行处理一下

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

2 participants