/*
 * Copyright 2015 Hiroki Uchida
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package dmm4j.http;

import java.util.Map;

/**
 * @author nikuyoshi
 */
public interface HttpClient {
    Map<String, String> getRequestHeaders();

    HttpResponse request(HttpRequest req) ;

    HttpResponse get(String url) ;

    HttpResponse post(String url) ;

    HttpResponse delete(String url) ;

    HttpResponse head(String url) ;

    HttpResponse put(String url) ;

}

@@ -30,16 +30,17 @@
 chida%0A *
+ 
 %0A * Lice
@@ -98,19 +98,16 @@
 cense%22);
-%0A *
  you may
@@ -131,16 +131,19 @@
 e except
+%0A *
  in comp
@@ -166,19 +166,16 @@
 License.
-%0A *
  You may
@@ -213,16 +213,12 @@
 t%0A *
+ 
 %0A *
-     
  htt
@@ -259,16 +259,17 @@
 E-2.0%0A *
+ 
 %0A * Unle
@@ -331,19 +331,16 @@
 software
-%0A *
  distrib
@@ -361,16 +361,19 @@
  License
+%0A *
  is dist
@@ -400,19 +400,16 @@
 %22 BASIS,
-%0A *
  WITHOUT
@@ -461,16 +461,19 @@
  express
+%0A *
  or impl
@@ -476,19 +476,16 @@
 implied.
-%0A *
  See the
@@ -544,19 +544,16 @@
 ions and
-%0A *
  limitat
@@ -558,24 +558,27 @@
 ations under
+%0A *
  the License
@@ -605,16 +605,17 @@
 .http;%0A%0A
+%0A
 import j
@@ -633,32 +633,94 @@
 p;%0A%0A
-/**%0A * @author nikuyoshi
+import dmm4j.DmmException;%0A%0A/**%0A * A utility class to handle HTTP request/response.%0A *
 %0A */
@@ -750,18 +750,77 @@
 lient %7B%0A
+%0A
   
+void addDefaultRequestHeader(String name, String value);%0A%0A
   Map%3CSt
@@ -855,18 +855,16 @@
 ers();%0A%0A
-  
   HttpRe
@@ -895,21 +895,38 @@
 st req) 
+throws DmmException
 ;%0A%0A
-  
   HttpRe
@@ -940,37 +940,54 @@
 get(String url) 
+throws DmmException
 ;%0A%0A
-  
   HttpResponse p
@@ -994,37 +994,54 @@
 ost(String url) 
+throws DmmException
 ;%0A%0A
-  
   HttpResponse d
@@ -1050,37 +1050,54 @@
 ete(String url) 
+throws DmmException
 ;%0A%0A
-  
   HttpResponse h
@@ -1112,21 +1112,38 @@
 ng url) 
+throws DmmException
 ;%0A%0A
-  
   HttpRe
@@ -1165,13 +1165,31 @@
 ng url) 
+throws DmmException
 ;
-%0A
 %0A%7D%0A

Fix HttpClient