Platforms to show: All Mac Windows Linux Cross-Platform

/CURL/CURLS get and put/CURLS get and put


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 get and put/CURLS get and put

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

Project "CURLS get and put.xojo_binary_project"
FileTypes
Filetype text
End FileTypes
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
Class MainWindow Inherits Window
Control fruits Inherits TextField
ControlInstance fruits Inherits TextField
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control Quantity Inherits TextField
ControlInstance Quantity Inherits TextField
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control TypeButton Inherits RadioButton
ControlInstance TypeButton(0) Inherits RadioButton
ControlInstance TypeButton(1) Inherits RadioButton
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() if TypeButton(1).Value then runGet else runPut end if End EventHandler
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Sub runGet() // this example sends a xml request to a server dim c as new CURLSMBS c.OptionVerbose=true c.OptionURL = "http://www.monkeybreadsoftware.de/cgi-bin/puttest.php?fruit="+fruits.text+"&quantity="+Quantity.text c.CollectDebugMessages = True c.CollectOutputData = true title=str(c.Perform) StaticText3.text=ReplaceLineEndings(c.OutputData,EndOfLine) End Sub
Sub runPut() dim header(-1) as string // this example sends a xml request to a server dim c as new CURLSMBS c.OptionVerbose=true c.OptionUpload=true c.OptionPut=true c.CollectDebugMessages = True c.CollectOutputData = true dim d as string = "fruit="+fruits.text+"&quantity="+Quantity.text c.inputdata=d c.OptionInFileSize=lenb(d) c.OptionURL = "http://www.monkeybreadsoftware.de/cgi-bin/puttest.php" title=str(c.Perform) StaticText3.text=ReplaceLineEndings(c.OutputData,EndOfLine) End Sub
End Class
End Project

See also:

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


The biggest plugin in space...