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

Is the Timeout property of HtmlWeb or the same one inside the PreRequest available? #580

Open
mahui-cn opened this issue Jan 5, 2025 · 2 comments
Assignees

Comments

@mahui-cn
Copy link

mahui-cn commented Jan 5, 2025

1. Description

I tried to set the Timeout property of HttpWebRequest inside the PreRequest delegation of HtmlWeb, but it seems not working at all. then I checked the source and found there is a Timeout property inside HtmlWeb. So which one is literally available?

  • HAP version: 1.11.72
  • NET version (net45)
@JonathanMagnan JonathanMagnan self-assigned this Jan 6, 2025
@JonathanMagnan
Copy link
Member

Both are available. Whether you choose to use the property or set it yourself through the PreRequest, it should have the same behavior.

We do not control the HttpWebRequest behavior with the timeout. So you are issue why it doesn't timeout could be a reason like the one explained here: https://stackoverflow.com/a/23773365/5619143

Just try to see if, without our library, you get the same behavior.

Best Regards,

Jon

@mahui-cn
Copy link
Author

Both are available. Whether you choose to use the property or set it yourself through the PreRequest, it should have the same behavior.

We do not control the HttpWebRequest behavior with the timeout. So you are issue why it doesn't timeout could be a reason like the one explained here: https://stackoverflow.com/a/23773365/5619143

Just try to see if, without our library, you get the same behavior.

Best Regards,

Jon

I tried setting the Timeout of HttpWebRequest for a long time in my project. But it always got timeout as the default value of Timeout of HtmlWeb. So I think hap just take the value of Timeout of HtmlWeb. But the other properties like Host of HttpWebRequest works in the http requesting. So I think HAP seems overriding the value of HttpWebRequest with the value of HtmlWeb. doesn't it?

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

No branches or pull requests

2 participants