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

Added ReadXML function to handle XML requests #28

Merged
7 commits merged into from Mar 23, 2016
Merged

Added ReadXML function to handle XML requests #28

7 commits merged into from Mar 23, 2016

Conversation

keuller
Copy link

@keuller keuller commented Mar 22, 2016

No description provided.

@@ -445,6 +445,24 @@ func (ctx *Context) JSON(jsonObjectOrArray interface{}) error {
return ctx.WriteJSON(http.StatusOK, jsonObjectOrArray)
}

// ReadXML reads XML from request's body
func (ctx Context) ReadXML(xmlObject interface{}) error {
Copy link

Choose a reason for hiding this comment

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

Should we tests the errors ? Line 452, 460 probably they will be missing in coverage.

Copy link
Author

Choose a reason for hiding this comment

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

@wsantos in fact I don't think it will be necessary, because only in the case of failure to parse the request's body the "error" will be returned by function. But for code coverage statistics I agree with you.

@ghost ghost merged commit f134728 into kataras:development Mar 23, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants