Opened on Oct 3, 2013 at 10:40:18 AM
Closed on Jan 1, 2014 at 6:14:07 PM
#2489 closed Feature Request (Completed)
HttpSetUserAgent return value
| Reported by: | anonymous | Owned by: | Jon |
|---|---|---|---|
| Milestone: | 3.3.11.0 | Component: | AutoIt |
| Version: | Severity: | None | |
| Keywords: | HttpSetUserAgent, return value | Cc: |
Description
Could you please make HttpSetUserAgent return the old user agent when setting a new one?
This would allow people to use this function in UDFs without having to worry about interfering with other parts of the script, because you could undo your change at the end of the function call.
Attachments (0)
Change History (3)
comment:2 by , on Dec 10, 2013 at 1:28:11 PM
BrewManNH, that does return it back to the default, but the ticket is for the case when the user sets the agent, and then calls a UDF, or another function, which requires a different agent.
The UDF could reset it to the default, but this is not the same as setting it back to its old value.
I'm sure the implementation is trivial, and is not breaking in any way, so I agree that returning the old user agent string is a good idea.
comment:3 by , on Jan 1, 2014 at 6:14:07 PM
| Milestone: | → 3.3.11.0 |
|---|---|
| Owner: | set to |
| Resolution: | → Completed |
| Status: | new → closed |
Added by revision [9430] in version: 3.3.11.0

From the help file:
This says all that you have to do to return it to the default is to pass it an empty string. You don't need to keep track of it, because you can reset it.