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 Dump method to enable manual request dumping #118

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

petomalina
Copy link

Created Dump method that allows user to dump the request at any time.

This is usable while debugging.

@petomalina petomalina changed the title added Dump method to enable manual request dumping Added Dump method to enable manual request dumping Nov 18, 2016
@petomalina
Copy link
Author

There are two calls to MakeRequest(), however, I was not sure how to restructure and if that is even a big deal while debugging.

@parnurzeal
Copy link
Owner

Any clear example usecase?
I still feel enabling debug is already good enough and not really different from the Dump method you are creating.

@petomalina
Copy link
Author

I wanted to get the request before I actually sent it.


// Dump creates the required request and logs it's contents.
func (s *SuperAgent) Dump() {
req, err := s.MakeRequest()
Copy link
Owner

Choose a reason for hiding this comment

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

We already have MakeRequest() before s.Debug.
You should not do it again here.

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.

2 participants