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

ResponseWriter adds a new function ErrorCustom to produces a custom error response. #174

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

applee
Copy link

@applee applee commented Jan 15, 2016

Our RESTful apis usually have custom error code when the request failed. But the custom err code is not equal to http status code which specified in RFC document. If we use custom status code instead of regular http status code , some iOS networking framework e.g. AFNetworking do not supported it, so we need a new function rest.ErrorCustom like this:

func ErrorCustom(w ResponseWriter, error interface{}, code int) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants