urlread and imread URL character limit

3 views (last 30 days)
Alex Buczynsky
Alex Buczynsky on 4 Oct 2016
Edited: Alex Buczynsky on 4 Oct 2016
Hello I am wondering what the character limit of the URL is in both the urlread and/or imread functions. For example, using google maps api, I have shortened a rather long string of text containing 7949 characters to 26 characters using TinyURL. The example can be found here: gMap Static tinyURL Example Link
The issue I am facing is when I try to read the long url and the following error is presented:
---- Command -----------------------------------------------------------------------------------
urlread('https://maps.googleapis.com/maps/api...'); %not displaying full url only for forum post
---- Error -------------------------------------------------------------------------------------
Error using urlreadwrite (line 90)
The IP address of "maps.googleapis.com" could not be determined.
Error in urlread (line 36)
[s,status] = urlreadwrite(mfilename,catchErrors,url,varargin{:});
My hypothesis is that the character count effects imread and urlread since when I tried a shorter url (not the tiny url since urlread cannot follow redirects) with 2487 characters, urlread could read the page just fine. My question is what this number is and if there is a workaround.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!