Skip to content

Added Dump method to enable manual request dumping#118

Open
petomalina wants to merge 1 commit intoparnurzeal:developfrom
petomalina:develop
Open

Added Dump method to enable manual request dumping#118
petomalina wants to merge 1 commit intoparnurzeal:developfrom
petomalina:develop

Conversation

@petomalina
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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