-
Notifications
You must be signed in to change notification settings - Fork 773
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
Helper to easily obtain a response and its body #370
Comments
Perhaps, I'mn a nitwit for these solutions, but how can the document title be retrieved in the easy way that you have now, and a full source only with a dozen lines of code? How come that fill html source needs a EventResponseReceived kind of solution, while Title is just Title (I never looked what it does under the hood). I can imagine, the source needs to be in memory to have access to the title. But as I said: I'm the nitwit here ;-) |
Btw. Now I did some extra digging. Title is evaluated like a javascript command. so I was looking if there is such a thing for all of the html. I found document.all to contain that information. |
We already have InnerHTML and OuterHTML as actions you can use. This is different from obtaining the original HTML response sent by the HTTP server, though. That requires waiting for a couple of events and executing an action, so it's not as simple. |
We'll add a higher level API for this in #370. For now, just leave it with OuterHTML.
This is doable, but the there's a reason that Chrome/ium does a secondary retrieval when doing |
For people coming here and wondering where |
Would love to see this feature added having to create a listener and capture the response body is more painful then it needs to be for any XML or JSON requests this would be preferable |
We added ExampleRetrieveHTML, which did this with
network.GetResponseBody
and a dozen lines of Go code, but apparently it's not that simple. We also need to wait fornetwork.EventLoadingFinished
on top of the response'snetwork.EventResponseReceived
.At this rate, the user would probably need over twenty lines of non-trivial Go code. This probably calls for a simple helper to deal with the simple use cases.
The text was updated successfully, but these errors were encountered: