Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: MBS CURL Plugin
Last modified Sun, 4th Jan 2014.
You find this example project in your MBS Xojo Plugin download as a Xojo project file within the examples folder: /CURL/CURLS query
Download this example: CURLS query.zip
Project "CURLS query.xojo_binary_project"
FileTypes
Filetype text
End FileTypes
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
End Project
See also:
- /CURL/CURLS Amazon S3 download
- /CURL/CURLS Amazon S3 upload
- /CURL/CURLS get and put/CURLS get and put
- /CURL/CURLS LDAP Query
- /CURL/CURLS post form values/CURLS post form values
- /CURL/CURLS post form values/CURLS post form values old
- /CURL/CURLS resume download
- /CURL/CURLS SSL verification/CURLS SSL verification
- /CURL/CURLS text download web 2.0
- /CURL/CURLS threaded download
Download this example: CURLS query.zip
The items on this page are in the following plugins: MBS CURL Plugin.