ソースを参照

fix comment and add method

Looly 5 年 前
コミット
ec9eee4aed

+ 11 - 0
hutool-http/src/main/java/cn/hutool/http/HttpRequest.java

@@ -1009,6 +1009,17 @@ public class HttpRequest extends HttpBase<HttpRequest> {
 	}
 
 	/**
+	 * 令牌验证,生成的头类似于:"Authorization: Bearer XXXXX",一般用于JWT
+	 *
+	 * @param token 令牌内容
+	 * @return HttpRequest
+	 * @since 5.5.3
+	 */
+	public HttpRequest bearerAuth(String token) {
+		return auth("Bearer " + token);
+	}
+
+	/**
 	 * 验证,简单插入Authorization头
 	 *
 	 * @param content 验证内容

+ 1 - 1
hutool-json/src/main/java/cn/hutool/json/InternalJSONUtil.java

@@ -74,7 +74,7 @@ final class InternalJSONUtil {
 	 * 缩进,使用空格符
 	 *
 	 * @param writer writer
-	 * @param indent 进空格数
+	 * @param indent 进空格数
 	 * @throws IOException IO异常
 	 */
 	protected static void indent(Writer writer, int indent) throws IOException {