Fernand Vanrie
2011-05-25 07:24:08 UTC
Hallo,
I trie to connect to Googleapis using OO and https ?
Code:
oConnector = createUnoService("com.sun.star.connection.Connector")
oConnection = oConnector.connect("socket,host=www.googleapis.com,port=80")
oConnection.write( StringToByteArray( "GET
https://www.googleapis.com/tasks/v1/lists/MDk5Nzc1MDY0NzQyMTk4NjEyMzM6MDow/tasks/MDk5Nzc1MDY0NzQyMTk4NjEyMzM6MDo4?pp=1&key=
<https://www.googleapis.com/tasks/v1/lists/MDk5Nzc1MDY0NzQyMTk4NjEyMzM6MDow/tasks/MDk5Nzc1MDY0NzQyMTk4NjEyMzM6MDo4?pp=1&key=>{YOUR_API_KEY}"
+ cCR + cLF & _
"Authorization: OAuth 1/kGy97RzqEi3JpSHlsBcaa0zL-hCNNzbbFRpHClhpnm4" +
cCR + cLF
oConnection.flush()
aByteArray = Array()
nBytesRead = oConnection.read(aByteArray, 5000)
oPipe = createUNOService ("com.sun.star.io.Pipe") ' heeft zowel een In
als OUtput stream
oTextInp = createUNOService ("com.sun.star.io.TextInputStream") 'kan lezen
oTextOut = createUNOService ("com.sun.star.io.TextOutputStream")' kan
schrijven
oTextInp.setInputStream(opipe) 'maakt dat pipe kan lezen
otextOut.setOutputStream(opipe) 'maakt dat pipe kan schrijven
otextout.setencoding("ISO-8859-1")
otextOut.writestring(ByteArrayToString(aByteArray))
s = oTextinp.readstring(Array("}"), true)
msgbox(s)
but the respons (s) is Google saying that i must use SSL
how ?
thanks for any hint
Fernand
I trie to connect to Googleapis using OO and https ?
Code:
oConnector = createUnoService("com.sun.star.connection.Connector")
oConnection = oConnector.connect("socket,host=www.googleapis.com,port=80")
oConnection.write( StringToByteArray( "GET
https://www.googleapis.com/tasks/v1/lists/MDk5Nzc1MDY0NzQyMTk4NjEyMzM6MDow/tasks/MDk5Nzc1MDY0NzQyMTk4NjEyMzM6MDo4?pp=1&key=
<https://www.googleapis.com/tasks/v1/lists/MDk5Nzc1MDY0NzQyMTk4NjEyMzM6MDow/tasks/MDk5Nzc1MDY0NzQyMTk4NjEyMzM6MDo4?pp=1&key=>{YOUR_API_KEY}"
+ cCR + cLF & _
"Authorization: OAuth 1/kGy97RzqEi3JpSHlsBcaa0zL-hCNNzbbFRpHClhpnm4" +
cCR + cLF
oConnection.flush()
aByteArray = Array()
nBytesRead = oConnection.read(aByteArray, 5000)
oPipe = createUNOService ("com.sun.star.io.Pipe") ' heeft zowel een In
als OUtput stream
oTextInp = createUNOService ("com.sun.star.io.TextInputStream") 'kan lezen
oTextOut = createUNOService ("com.sun.star.io.TextOutputStream")' kan
schrijven
oTextInp.setInputStream(opipe) 'maakt dat pipe kan lezen
otextOut.setOutputStream(opipe) 'maakt dat pipe kan schrijven
otextout.setencoding("ISO-8859-1")
otextOut.writestring(ByteArrayToString(aByteArray))
s = oTextinp.readstring(Array("}"), true)
msgbox(s)
but the respons (s) is Google saying that i must use SSL
how ?
thanks for any hint
Fernand
--
-----------------------------------------------------------------
To unsubscribe send email to dev-***@api.openoffice.org
For additional commands send email to ***@api.openoffice.org
with Subject: help
-----------------------------------------------------------------
To unsubscribe send email to dev-***@api.openoffice.org
For additional commands send email to ***@api.openoffice.org
with Subject: help