NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: David on January 10, 2019, 11:46:23 AM

Title: Clearing MyWebClient.SetValue() Parameters for Subsequent Fetches
Post by: David on January 10, 2019, 11:46:23 AM
Using the WebClient .SetValue() I add several parameters and then fetch the URL.  How do I clear the internal list of parameters that were added with SetValue()? 

I tried:
MyWebClient.Start()


If I first run this
MyWebClient.SetValue('parm1', 'my text')
MyWebClient.Fetch('http://someurl')

Then after the PageReceived I run this
MyWebClient.Start()
MyWebClient.SetAllHeadersDefault()
MyWebClient.Fetch('http://someotherurl')

I can see in the logs that parm1 was added to the fetched URL.  I can probably solve this with MyWebClient.DeleteValue('Parm1') but was wondering then what .Start() was for.  And if I do a .Start() do I still need to do .SetAllHeadersDefault()?
Title: Re: Clearing MyWebClient.SetValue() Parameters for Subsequent Fetches
Post by: Bruce on January 10, 2019, 09:55:15 PM
MyWebClient.FreeFieldsQueue()

This should be in .Start (I've added that for 11.05)

cheers
Bruce
Title: Re: Clearing MyWebClient.SetValue() Parameters for Subsequent Fetches
Post by: David on January 11, 2019, 11:15:59 AM
Thank you.

Does .Start() also include .SetAllHeadersDefault() ?
Title: Re: Clearing MyWebClient.SetValue() Parameters for Subsequent Fetches
Post by: Bruce on January 14, 2019, 01:35:49 AM
In the spirit of "teach a man to fish" - the NetWebClient code is in netwww.clw.....
It's derived from NetWebHttp class which is in nethttp.clw
Cheers
Bruce