troi logo-homeproductspurchasesupportnewsaboutliststipslinks-

FAQ part 4: Troi URL Plug-in questions

Table of Contents | Part 1 | Part 2 | Part 3 File Plug-in | Part 4 URL Plug-in

URL Plug-in questions

Back to top

URL Plug-in Questions

Q. Can you use Troi URL Plug-in to access a file hosted with the Web Companion?
Yes, this is possible. However it won't work always if you are trying to access a URL on the same computer. This is the case if you use the same FileMaker Pro Client for the Web Companion and Troi URL Plug-in.

Q. How do I use Troi URL Plug-in in combination with a proxy server?
You can explicitly set the proxy with the TURL_SetProxy function. If you don't use this function the system settings for proxies will be used.

Q. Can Troi URL Plug-in manage and set cookies?
Yes, you can use the TURL_SetCookies function to set the cookies text on macOS. On Windows cookies are handled natively by the operating system, so this function does not do anything on this platform.
See the user guide and examples for more information.

Q. Can Troi URL Plug-in set the content type and other headers in the HTTP request?
Yes, use the TURL_SetCustomHeader function for this.

Q. My TURL_Post command works on macOS but not on Windows (or vice versa). What gives?
When the same command works on Mac but not on Windows this probably has to do with the encoding. On Windows the default header is "application/x-www-form-urlencoded" and on Mac "NotEncoded" is the default. When your Post works on Mac but not on Windows, please try adding (on Windows) the switch -NotEncoded to the Post function, like this:

TURL_Post("-NotEncoded " ; theURL ; theData)

When your Post works on Windows but not on Mac, you should (on Mac) first set a custom header:

TURL_SetCustomHeader("-unused " ; "Content-Type: application/x-www-form-urlencoded" )

and then do the TURL_Post step.

Q. Which SSL certificates are used by Troi URL Plug-in?

The plug-in uses the certificates that the OS has installed.

Q. How can the URL plug-in send the data of radio buttons and checkboxes in a form?
With the URL plug-in you can also post forms that have radio buttons or checkboxes in it.

Say you have this web page with a FORM on it:

<HTML>
<HEAD> <TITLE>Test Form</TITLE> </HEAD>
<BODY>
<P>TEST</P>

<FORM ACTION="/cgi-sys/formmail.pl" METHOD=POST>

<P><INPUT TYPE=checkbox NAME=checkbox1 VALUE=value1 CHECKED>checklabel</P>
<P><INPUT TYPE=radio NAME=myradio VALUE=radiovalue1>radiolabel 1
<INPUT TYPE=radio NAME=myradio VALUE=radiovalue2>radiolabel 2</P>

<P>input data:<INPUT TYPE=text NAME=field1 VALUE="" SIZE=32><BR>

<INPUT TYPE=submit NAME=Submit VALUE="Submit for Processing"></P>

</FORM>

</BODY>
</HTML>

This FORM has a checkbox, 2 radio buttons and an input field.

Checkboxes:

In the POST data you only include the checkbox if it is checked. Otherwise leave it out. When you add it, add the name, in this case "checkbox1", an equals sign and the value, here "value1".

So in the case above you add: "checkbox1=value1" for this checked box.

Radiobuttons:

For a radiobutton you include the value of the radiobutton that is selected. In this example "myradio", an equals sign and the value of the chosen radiobutton, here "radiovalue2".

Putting it together you need to send this as the POST data (the 3rd parameter):

checkbox1=value1&myradio=radiovalue2&field1=typeddata&Submit=Submit%20for%20Processing

NOTE Spaces are not allowed, so you need to encode these as %20. Also other higher ASCII characters need to be encoded. You can use the TURL_ToHTTP function of the plug-in to do this.

Q. How can I see what POST data is sent to a web server?
HTTP requests are never displayed to the user. If you want to see them, you need to use tools such as the Firefox Web Console, Chrome Developer Tools or Fiddler.

 

Back to top

Other Questions?

If your question is not answered here, please look in the documentation that comes with the plug-in. We will be adding more to this FAQ. If you have suggestions please .


www.troi.com/support   © 2016 Troi Automatisering, all rights reserved.