using the URL content method with https

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bmcgonag
Posts: 40
Joined: Thu Mar 13, 2014 6:51 pm

using the URL content method with https

Post by bmcgonag » Tue Jun 02, 2015 2:35 pm

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?

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: using the URL content method with https

Post by Klaus » Tue Jun 02, 2015 2:39 pm

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

bmcgonag
Posts: 40
Joined: Thu Mar 13, 2014 6:51 pm

Re: using the URL content method with https

Post by bmcgonag » Tue Jun 02, 2015 3:20 pm

it's simple things like that, which make me feel completely brilliant. Thank you for pointing out my mistake...geez.

Post Reply