/**
 * The MIT License
 *
 * Copyright for portions of OpenUnirest/uniresr-java are held by Mashape (c) 2013 as part of Kong/unirest-java.
 * All other copyright for OpenUnirest/unirest-java are held by OpenUnirest (c) 2018.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package unirest;

import java.io.InputStream;
import java.util.Optional;
import java.util.function.Function;

public interface HttpResponse<T> {

    int getStatus();

    String getStatusText();

    /**
     * @return Response Headers (map) with <b>same case</b> as server response.
     * For instance use <code>getHeaders().getFirst("Location")</code> and not <code>getHeaders().getFirst("location")</code> to get first header "Location"
     */
    Headers getHeaders();

    // This method is a lie. You never get the real raw response from it
    // you only get a copy, or worse, the body transformed BACK to a stream
    // If you want to use raw content use the new functional methods
    @Deprecated
    InputStream getRawBody();

    T getBody();

    Optional<RuntimeException> getParsingError();

    <V> V mapBody(Function<T, V> func);

    <V> V mapRawBody(Function<InputStream, V> func);
}

@@ -1415,65 +1415,232 @@
 n;%0A%0A
-public interface HttpResponse%3CT%3E %7B%0A%0A    int getStatus();%0A
+/**%0A * @param %3CT%3E a Http Response holding a specific type of body.%0A */%0Apublic interface HttpResponse%3CT%3E %7B%0A%0A    /**%0A     * @return the HTTP status code.%0A     */%0A    int getStatus();%0A%0A    /**%0A     * @return status text%0A     */
 %0A   
@@ -1950,17 +1950,25 @@
 ;%0A%0A    /
-/
+**%0A     *
  This me
@@ -2030,18 +2030,18 @@
  it%0A    
-//
+ *
  you onl
@@ -2110,10 +2110,10 @@
     
-//
+ *
  If 
@@ -2179,160 +2179,985 @@
     
-@Deprecated%0A    InputStream getRawBody();%0A%0A    T getBody();%0A%0A    Optional%3CRuntimeException%3E getParsingError();%0A%0A    %3CV%3E V mapBody(Function%3CT, V%3E func);%0A
+ * @return a copy of the input stream%0A     * */%0A    @Deprecated%0A    InputStream getRawBody();%0A%0A    /**%0A     * @return the body%0A     */%0A    T getBody();%0A%0A    /**%0A     * If the transformation to the body failed by an exception it will be kept here%0A     * @return a possible RuntimeException. Checked exceptions are wrapped in a UnirestException%0A     */%0A    Optional%3CRuntimeException%3E getParsingError();%0A%0A    /**%0A     * @param func a function to transform a body type to something else.%0A     * @param %3CV%3E The return type of the function%0A     * @return%0A     */%0A    %3CV%3E V mapBody(Function%3CT, V%3E func);%0A%0A    /**%0A     * This method is a lie. You never get the real raw response from it%0A     * you only get a copy, or worse, the body transformed BACK to a stream%0A     * If you want to use raw content use the new functional methods%0A     * @param func a function to map a inputstream to a new body%0A     * @param %3CV%3E the return type%0A     * @return the return type%0A     */%0A    @Deprecated
 %0A   

add some docs