一、注释
1.方法注释
/**
* An HTTP stack abstraction.
* Http抽象
*/
public interface HttpStack {
/**
* Performs an HTTP request with the given parameters.
* 用给出的参数执行一次Http请求
*如果request.getPostBody == null ,则发送一个post请求,并且Content-Type被设置成 request.getPostBodyContentType
* <p>A GET request is sent if request.getPostBody() == null. A POST request is sent otherwise,
* and the Content-Type header is set to request.getPostBodyContentType().</p>
*
* @param request the request to perform
* @param additionalHeaders additional headers to be sent together with
* {@link Request#getHeaders()}
* @return the HTTP response
*/
public HttpResponse performRequest(Request<?> request, Map<String, String> additionalHeaders)
throws IOException, AuthFailureError;
}
总体用 /** */包裹,总体概括一次
(Performs an HTTP request with the given parameters.),
详细解释用 <p> </p>, 更详细解释某个参数的话,用{@link Request#getHeaders()}来表示关联