Platforms to show: All Mac Windows Linux Cross-Platform

/CURL/CURLS post form values/CURLS post form values old


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 post form values/CURLS post form values old

This example is the version from Fri, 10th Feb 2022.

Project "CURLS post form values old.xojo_binary_project"
FileTypes
Filetype text
Filetype all
End FileTypes
Class Window1 Inherits Window
Control ListBox1 Inherits ListBox
ControlInstance ListBox1 Inherits ListBox
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() DoUpload End EventHandler
End Control
Control Result Inherits TextField
ControlInstance Result Inherits TextField
End Control
Control HTMLViewer1 Inherits HTMLViewer
ControlInstance HTMLViewer1 Inherits HTMLViewer
End Control
Private Sub DoUpload() dim e as integer dim d as new UploadCURL d.OptionURL = "https://www.monkeybreadsoftware.com/filemaker/examples/echo.php" d.OptionVerbose = True d.CollectOutputData = true d.FormAdd(d.kFormCopyName,"firma", d.kFormCopyContents, "Test, Inc.") d.FormAdd(d.kFormCopyName,"name", d.kFormCopyContents, "Mr. Tester") d.FormAdd(d.kFormCopyName,"strasse", d.kFormCopyContents, "Average Road") d.FormAdd(d.kFormCopyName,"plz", d.kFormCopyContents, "12345") d.FormAdd(d.kFormCopyName,"ort", d.kFormCopyContents, "Nickenich") d.FormAdd(d.kFormCopyName,"land", d.kFormCopyContents, "The Test States") d.FormAdd(d.kFormCopyName,"telefon", d.kFormCopyContents, "555-555-555") d.FormAdd(d.kFormCopyName,"email", d.kFormCopyContents, "test@test.invalid") d.FormAdd(d.kFormCopyName,"comment", d.kFormCopyContents, "just a form test") d.FormFinish e=d.Perform ListBox1.AddRow "Result: "+str(e) ListBox1.AddRow d.GetInfoContentType Result.text = d.OutputData HTMLViewer1.LoadPage d.OutputData, nil 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
Class UploadCURL Inherits CURLSMBS
EventHandler Sub DebugMessage(infotype as integer, data as string, dataSize as Integer) System.DebugLog str(infotype) System.DebugLog data End EventHandler
EventHandler Function Progress(dltotal as Int64, dlnow as Int64, ultotal as Int64, ulnow as Int64, percent as double) As boolean if ultotal=0 then window1.ListBox1.AddRow "Uploading..." else window1.ListBox1.AddRow "Uploading "+Format(ulnow/ultotal,"0%") end if End EventHandler
Sub Constructor() 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...