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

封装请求响应 #11

Merged
merged 2 commits into from
Sep 14, 2021
Merged

封装请求响应 #11

merged 2 commits into from
Sep 14, 2021

Conversation

Mvbbb
Copy link
Contributor

@Mvbbb Mvbbb commented Sep 11, 2021

  1. 添加 simpleHttpResponse 类,包含 code(响应码),success(是否成功),header(响应头),body(响应体)字段,用于封装 http 响应
  2. 不成功的 http 响应不再抛出 “Unexpected code”异常。而是封装为 simpleHttpResponse 类,使用者自行处理失败的请求响应

1. 添加 simpleHttpResponse 类,包含 code(响应码),success(是否成功),header(响应头),body(响应体)字段,用于封装 http 响应
2. 不成功的 http 响应不再抛出 “Unexpected code”异常。而是封装为 simpleHttpResponse 类,使用者自行处理失败的请求响应
@xkcoding xkcoding merged commit 0a979b0 into xkcoding:master Sep 14, 2021
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

Successfully merging this pull request may close these issues.

2 participants