Page 1 of 1

using the URL content method with https

Posted: Tue Jun 02, 2015 2:35 pm
by bmcgonag
I'm using the following code

Code: Select all

on mouseUp
   put the text of "txtAlloyURL" into testURL
   put URL testURL into mainReturnInfo
   put the result into errorText
   if errorText is empty then
      set the text of field "fldErrorCode" to mainReturnInfo
   else
      set the text of field "fldErrorCode" to errorText
   end if
end mouseUp
To try and get the expected 405 Method Not Allowed error from a https URL.

In other words, I know that I should get 'HTTP/1.1 405: Method Not Allowed' when I browse to these URLs.

I followed a tutorial on the site.

When I run the program, I get an error when trying to read in the URL I enter.
button "btnStartChecking": execution error at line 2 (Chunk: error in object expression) near "txtAlloyURL", char 8
Any idea why it seems to fail on the second "/" in the https:// portion of the URL?

Re: using the URL content method with https

Posted: Tue Jun 02, 2015 2:39 pm
by Klaus
Hi bmcgonag,

problem is your first line!
LC does not know what "txtAlloURL" is, unless you tell it:
...
put the text of FIELD "txtAlloyURL" into testURL
...
This should do the trick!


Best

Klaus

Re: using the URL content method with https

Posted: Tue Jun 02, 2015 3:20 pm
by bmcgonag
it's simple things like that, which make me feel completely brilliant. Thank you for pointing out my mistake...geez.