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

Request: fix parameters issue of POST request #35

Merged
merged 3 commits into from
Dec 7, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Rexxar/Decorator/RXRRequestInterceptor.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ - (void)startLoading
if ([decorator respondsToSelector:@selector(prepareWithRequest:)]) {
[decorator prepareWithRequest:request];
}
request = [[decorator decoratedRequestFromOriginalRequest:[request copy]] mutableCopy];
request = [[decorator decoratedRequestFromOriginalRequest:request] mutableCopy];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

方法名已经告诉了你,会返回一个拷贝的对象,就像“fromOriginal” 暗示的那样,所以这个连最后一个 mutableCopy 也不用了吧?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要啊, request 是 NSMutableURLRequest, 方法返回的是 NSURLRequest,不 mutableCopy 会有 warning 的

}
}

Expand Down