Closed ly410726 closed 4 years ago
You should be able to store the Requests without calling them. You could also create some sort of structure or enum that stores your Requests:
public enum Requests {
public static var getPosts: Request {
Request {
...
}
}
...
}
Something like that should work.
Closing this due to inactivity.
这个请求能够二次封装吗,我想把请求头,公共参数封装到一起,还有一些公共设置,例如请求超时时间。然后做一个可以返回模型也可以返回模型的封装,但是没有封装好