You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
• Add FSNRequestMethodDELETE to the FSNRequestMethod enum.
• implement the case to stringForRequestMethod.
• implement the case to makeNSURLRequest. I believe this is simply a break (same as GET).
I'm happy to take a look at any code you have!
@sugarmo that might have been a better approach. At the time I chose to use the enumeration to ensure that each supported HTTP method was completely implemented; we only used GET and POST at the time. I guess that the downside of using strings is there are more ways to make an invalid or nonstandard request. The real question is, if FSConnection was changed to use string methods, which of methods would require additional logic? If they all just work then I agree it would be a good option, but then again, in that case it is trivial to add the enums. I never added the others because I never had endpoints to test them on.
@gwk I think the validity of a HTTP method should not be considered by an open source network library. A library should ensure that users can use it in most cases without modifying source code. And I think that if you change to use string constants, you will have not much thing being rewritten.
@sugarmo thanks again for the input. i have not worked on FSNetworking for quite some time, and have no plans to make these changes, nor do I have commit access to the original github repo. However if you would like to create a fork I would be happy to review changes and discuss.
Activity
gwk commentedon Apr 26, 2014
• Add FSNRequestMethodDELETE to the FSNRequestMethod enum.
• implement the case to stringForRequestMethod.
• implement the case to makeNSURLRequest. I believe this is simply a break (same as GET).
I'm happy to take a look at any code you have!
sugarmo commentedon Aug 28, 2014
@gwk Why not list methods as String Constants!
gwk commentedon Aug 28, 2014
@sugarmo that might have been a better approach. At the time I chose to use the enumeration to ensure that each supported HTTP method was completely implemented; we only used GET and POST at the time. I guess that the downside of using strings is there are more ways to make an invalid or nonstandard request. The real question is, if FSConnection was changed to use string methods, which of methods would require additional logic? If they all just work then I agree it would be a good option, but then again, in that case it is trivial to add the enums. I never added the others because I never had endpoints to test them on.
sugarmo commentedon Aug 29, 2014
@gwk I think the validity of a HTTP method should not be considered by an open source network library. A library should ensure that users can use it in most cases without modifying source code. And I think that if you change to use string constants, you will have not much thing being rewritten.
gwk commentedon Aug 29, 2014
@sugarmo thanks again for the input. i have not worked on FSNetworking for quite some time, and have no plans to make these changes, nor do I have commit access to the original github repo. However if you would like to create a fork I would be happy to review changes and discuss.