You find this example project in your Plugins Download as a Xojo project file within the examples folder: /CURL/CURLS query
MenuBar MenuBar1
MenuItem UntitledMenu1 = ""
MenuItem FileMenu = "&File"
MenuItem FileQuit = "Quit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu0 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
EventHandler Sub Open()
dim header(-1) as string
dim c as new MyCURL
// this example sends a xml request to a server
c.OptionVerbose=true
c.OptionURL = "http://www.someserver.com/service"
c.OptionPost = true
c.OptionCustomRequest="POST"
Dim request as String = "<?xml version=""1.0""?><methodCall><methodName>application.getValue</methodName><params><param><value>info</value></param></params></methodCall>"
c.InputData = request
header.Append "Content-Type: text/xml"
c.SetOptionHTTPHeader header
msgbox str(c.Perform)
End EventHandler
End Class
Class MyCURL Inherits CURLSMBS
EventHandler Sub DebugMessage(infotype as integer, data as string)
System.DebugLog data
End EventHandler
EventHandler Function Write(data as string) As integer
MsgBox data
Return lenb(data)
End EventHandler
End Class