Sample code for 30+ languages & platforms
Java

ISBNdb API v2 Get Book Details

See more HTTP Misc Examples

Demonstrates how to send a GET request to the ISBNdb API v2 with Authorization header.

Chilkat Java Downloads

Java
import com.chilkatsoft.*;

public class ChilkatExample {

  static {
    try {
        System.loadLibrary("chilkat");
    } catch (UnsatisfiedLinkError e) {
      System.err.println("Native code library failed to load.\n" + e);
      System.exit(1);
    }
  }

  public static void main(String argv[])
  {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttp http = new CkHttp();

    http.SetRequestHeader("Authorization","YOUR_REST_KEY");
    String jsonStr = http.quickGetStr("https://api2.isbndb.com/book/9780134093413");
    if (http.get_LastMethodSuccess() == false) {
        System.out.println(http.lastErrorText());
        return;
        }

    System.out.println("Response status code: " + http.get_LastStatus());
    System.out.println("Response JSON:");
    System.out.println(jsonStr);
  }
}