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

why i can't set post json format to server ? #46

Closed
lianchengtong opened this issue Jun 11, 2019 · 2 comments
Closed

why i can't set post json format to server ? #46

lianchengtong opened this issue Jun 11, 2019 · 2 comments

Comments

@lianchengtong
Copy link

lianchengtong commented Jun 11, 2019

private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody body = RequestBody.create(JSON, gson.toJson(param));
i often use okhttp3 like above setting format for transfer ,how about xupdate do it ?

@xuexiangjys
Copy link
Owner

demo中默认使用的是okhttputils实现的IUpdateHttpService,且默认使用的post方式是form表单格式,这里你可以修改使用postString或者自己实现一个IUpdateHttpService,不是很难.

@xuexiangjys
Copy link
Owner

详细参见新添加的注释:
f1a76e7

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