Forum Discussion

Richard_W's avatar
Richard_W
Frequent Visitor
8 years ago

Web.Contents unencoding forward slahes

Hi,

 

I'm trying to call the Google Search Console API which requires the following format:

 

GET https://www.googleapis.com/webmasters/v3/sites/siteUrl/urlCrawlErrorsCounts/query

Where siteUrl is an encoded URL of the format:

 

https%3A%2F%2Fwww.example.com

 

However when I put that in to the Web.Contents function it always unencodes the forward slashes meaning I can never reach the Google endpoint.

 

Example:

 

 

 

 

 

 

 

 

 

I have used the Uri.EscapeDataString() function but Web.Contents just undoes the encoding.

 

How do I tell the function not to unencode the string?

 

Thanks,

Richard

6 Replies