468,140 Members | 1,466 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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

116 64KB
Hi,

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...
  6.  
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?

Thanks!
Jan 15 '15 #1
0 972

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
27 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.