470,634 Members | 2,077 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,634 developers. It's quick & easy.

HttpWebRequest - can I store the endpoint URL for faster access?

116 64KB

I am using the following method to access a server-based file.

Expand|Select|Wrap|Line Numbers
  1. Dim myURL As HttpWebRequest
  2. myURL = WebRequest.Create("https://www.abc.efg/data")
  3. myURL.Method = "POST"
  4. myURL.ContentType = "application/json"
  5. etc...
I'm wondering if it is possible to store the HttpWebRequest on load and use it for all future requirements? I get the feeling that the WebRequest.Create needs to locate the file each time (?) which slows things up unnecessarily.

If this is possible, do I need to alter the code in some way? Such as Dim myURL As NEW HttpWebRequest = storedURL?

Jan 15 '15 #1
0 1014

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Art | last post: by
3 posts views Thread by Vinay Patel | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.