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
Distinguishing PUT and GET responses corresponding to the same URL #64
Comments
hello |
Hi, |
I "solved" it by removing Overcoat... and manually parse the response with MTLJSONAdapter |
@priyarajagopal How did you finally solve this? |
Hi guys, though this is an issue long ago, I'd like to support this in Overcoat. (I'm new maintainer since this summer.) I have a purpose that the URLMatcher would be configured like: + (NSDictionary *)modelClassesByResourcePath {
return @{
@"model": [OVCTestModel class],
@"path": [OVCURLMatcherNode nodeWithClassesByHTTPRequestMethods:@{
@"*": [SomeModel class],
@"GET": [SomeGetModel class],
@"PUT": [SomePutModel class],
}],
};
} So all requests to URL like |
What about distinguishing responses corresponding to the same URL and different query parameters. |
@0ldF0x: sure 👍 |
Hi
So I have a URL http://server/api/v1/users . This URL can be used to GET a list of user names or it can be used to PUT a list of users (the users are specified in the request body). This is quite common in RESTful services. The response to the GET and PUT requests are naturally different. How do I use Overcoat to distinguish between the GET and PUT response corresponding to the same URL ? Right now, Overcoat tries to map the PUT response to the object that I've specified in modelClassesByResourcePath for the GET query. Help please!
thanks!
The text was updated successfully, but these errors were encountered: