com.couchbase.client.http
Class HttpUtil

java.lang.Object
  extended by com.couchbase.client.http.HttpUtil

public final class HttpUtil
extends java.lang.Object


Method Summary
static java.lang.String buildAuthHeader(java.lang.String username, java.lang.String password)
          Generate the payload of an authorization header given a username and password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildAuthHeader

public static java.lang.String buildAuthHeader(java.lang.String username,
                                               java.lang.String password)
                                        throws java.io.UnsupportedEncodingException
Generate the payload of an authorization header given a username and password. Since our HTTP needs are modest in this library and our dependencies are lightweight enough to not carry all of the auth capabilities, this method will generate the payload needed for an authorization header.

Returns:
a value for an HTTP Basic Auth Header
Throws:
java.io.UnsupportedEncodingException


Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.