Skip to content

Accessing service programatically #2

@jana01

Description

@jana01

Hello,

I have been trying to integrate your service to our application. I need to get the status of the thumbnail so that I know when it is ready.

I use Java or Javascript.

With Javascript, I am not allowed to make Ajax request due to cross-domain scripting restrictions. I guess you don't support JSONP?

With Java I use the following rather simple code:

    HttpURLConnection connection = null;
    URL u = new URL("http://api.webthumbnail.org?url=dir.bg&action=get-status");
    connection = (HttpURLConnection) u.openConnection();

    connection.connect();

    System.out.println(connection.getResponseMessage());
    System.out.println(connection.getResponseCode());

    InputStream str = connection.getInputStream();

But I am getting "Invalid Http response" exception.

Can you please help on this?

Thank you!

PS Also, your contact form crashed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions