Platforms to show: All Mac Windows Linux Cross-Platform

/CURL/CURLS LDAP Query


Required plugins for this example: MBS CURL Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /CURL/CURLS LDAP Query

This example is the version from Wed, 3rd Jan 2023.

Project "CURLS LDAP Query.xojo_binary_project"
FileTypes
Filetype text
End FileTypes
Class MainWindow Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() Run End EventHandler
End Control
Control URL Inherits TextField
ControlInstance URL Inherits TextField
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control TextArea1 Inherits TextArea
ControlInstance TextArea1 Inherits TextArea
End Control
Control User Inherits TextField
ControlInstance User Inherits TextField
End Control
Control Label1 Inherits Label
ControlInstance Label1 Inherits Label
End Control
Control Pass Inherits TextField
ControlInstance Pass Inherits TextField
End Control
Control Label2 Inherits Label
ControlInstance Label2 Inherits Label
End Control
Private Sub Run() dim d as new CURLSMBS // collect output as we don't have events to handle it right away d.CollectDebugMessages = true d.CollectOutputData = true d.CollectHeaders = true // write debug log d.OptionVerbose = true // download here d.OptionURL = URL.Text d.OptionUserName = User.Text d.OptionPassword = pass.Text // if you use SSL, maybe put in a certificate or disable verification? d.OptionSSLVerifyHost = 0 d.OptionSSLVerifyPeer = 0 // run download dim e as integer = d.Perform // check result dim s as string = d.OutputData // fix text encoding if s.Encoding <> nil then // ok? elseif encodings.UTF8.IsValidData(s) then s = DefineEncoding(s, Encodings.UTF8) else s = DefineEncoding(s, encodings.ISOLatin1) end if // fix line endings s = ReplaceLineEndings(s, EndOfLine) TextArea1.text = s 'ResultText.Text="Result: "+Str(e) dim DebugMessage as string = d.DebugMessages // check in debugger on error if e <> 0 then Break MsgBox d.LasterrorMessage end if End Sub
End Class
MenuBar MenuBar1
MenuItem UntitledMenu1 = ""
MenuItem FileMenu = "&File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu5 = ""
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu0 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "Clear"
MenuItem UntitledMenu4 = ""
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = ""
End MenuBar
Class App Inherits Application
End Class
End Project

See also:

The items on this page are in the following plugins: MBS CURL Plugin.


The biggest plugin in space...