Jump to content

http getrequeststream


Recommended Posts

I'm trying t upload a file to dropbox using the dropbox RESTful API. 

 

In the last section on the page at http://cgeers.com/2012/03/11/dropbox-rest-api-part-5-file-upload/ , 

the author uses a method "GetRequestStream"

 

Everything I've done so far with the dropbox API has utilised a winhttp object, with the structure below:

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("POST", $URL, false)
$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")

$authString = 'OAuth oauth_version="1.0", oauth_signature_method="PLAINTEXT", oauth_consumer_key="'& $key & '", oauth_token="' & $accessToken & '", oauth_signature="' & $secret & '&' & $accessSecret & '"'
$oHTTP.SetRequestHeader("Authorization",$authString)



; Performing the Request
$oHTTP.Send()

; Download the body response if any, and get the server status response code.
$oReceived = $oHTTP.ResponseText
$oStatusCode = $oHTTP.Status

Now I need a GetRequestStream() mehod, I'm not sure if there is a facility to do this.

I've tried $oHTTP.GetRequestStream() but it just threw an error

If anybody can offer some insight It would be a great help

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...