what is Http-Auth?

Discussion in 'OT Technology' started by babygodzilla, Nov 14, 2007.

  1. babygodzilla

    babygodzilla I love rice

    Joined:
    Nov 5, 2001
    Messages:
    3,108
    Likes Received:
    0
    i'm trying to play with the del.icio.us API using Java. I'm not sure what this means:

    Link here

    i googled some delicious API tutorials, but i only found one good one, and it's way outdated.
     
  2. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    you know when you try to go to a "secure" website and it asks you for username and password with a browser-specific pop-up dialog? Yea, that's http-auth.
     
  3. babygodzilla

    babygodzilla I love rice

    Joined:
    Nov 5, 2001
    Messages:
    3,108
    Likes Received:
    0
    ah. i see. so its not something i have to write. thank you very much! :)
     
  4. babygodzilla

    babygodzilla I love rice

    Joined:
    Nov 5, 2001
    Messages:
    3,108
    Likes Received:
    0
    what is the best way to execute a URL in Java? so with this delicious API, i construct a URL object from the username, password, url to be bookmarked, and description Strings. the result is something like:

    Code:
    https://username:[email protected]/v1/posts/add?url=google.com&description=awesome
    now how do I run this? is the following code the best way to do it?

    Code:
    import java.net.*;
    import java.io.*;
    
    public class URLReader {
        public static void main(String[] args) throws Exception {
    	URL yahoo = new URL("http://www.yahoo.com/");
    	BufferedReader in = new BufferedReader(
    				new InputStreamReader(
    				yahoo.openStream()));
    
    	String inputLine;
    
    	while ((inputLine = in.readLine()) != null)
    	    System.out.println(inputLine);
    
    	in.close();
        }
    }
    
    that's from http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html
     
  5. babygodzilla

    babygodzilla I love rice

    Joined:
    Nov 5, 2001
    Messages:
    3,108
    Likes Received:
    0

Share This Page