Hi Fernand, *,

On Wed, May 25, 2011 at 9:24 AM, Fernand Vanrie <s...@pmgroup.be> wrote:
> 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")

first: don't know whether it is  supported by OOo like this, but your
example has several general problems, so here we go...

If you want to use ssl, then you should try with the default ssl-port (443)

> oConnection.write( StringToByteArray( "GET
> https://www.googleapis.com/tasks/v1/lists/MDk5Nzc1MDY0NzQyMTk4NjEyMzM6MDow/tasks/MDk5Nzc1MDY0NzQyMTk4NjEyMzM6MDo4?pp=1&key=

And http GET doesn't include the hostname, just the path. Specify the
host in the Host parameter.


and you're not supposed to write it twice either, but maybe I'm
getting things wrong here.
And obviously "YOUR_API_KEY" is to be replaced by your API key.

GET /path/to?param=value&param2=value2 HTTP/1.1
Host: www.myhost.com
Connection: close

(well, connection: close as it is the only request, you can also just
use http 1.0 request that only have one request at a time anyway)

To unsubscribe send email to dev-unsubscr...@api.openoffice.org
For additional commands send email to sy...@api.openoffice.org
with Subject: help

Reply via email to