Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Msxmlhttp sending image data
Message
From
16/07/2014 05:37:33
 
 
To
15/07/2014 14:41:32
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01603736
Message ID:
01603773
Views:
95
I suggest you try West-wind's wwHTTP

>Hi all
>
>I'm using msxmlhttp v 6.0 to get/post simple things. Now I've been asked to send an image. The enctype must be "multipart/form-data".
>
>o=CREATEOBJECT("Empty")
>ADDPROPERTY(m.o,"FirstName","Mike")
>ADDPROPERTY(m.o,"LastName","Yearwood")
>oJSON=CREATEOBJECT("Json")
>lcJSON = oJSON.Stringify(m.o)
>?m.lcJSON
>
>oHTTP = CREATEOBJECT("MSXML2.XMLHTTP.6.0")
>cusername="cantsay"
>cpassword="wontsay"
>cUrl="https://somewhere.com/overtherainbow"
>luResult = oHTTP.OPEN("GET", m.cURL, .F., m.cUserName, m.cPassword)
>lcEncode64=STRCONV(m.cUserName+":"+m.cPassword,13)
>oHTTP.SetRequestHeader("Authorization", "Basic "+m.lcEncode64)
>oHTTP.SetRequestHeader("Content-Type", "application/json")
>
>oHTTP.SEND()
>
>?oHTTP.Status()
>
>Where and how would I go about adding a filename and a data stream?
>
>Thanks
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform