mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
fix comment and add method
This commit is contained in:
parent
8dd004f4ee
commit
ec9eee4aed
@ -1008,6 +1008,17 @@ public class HttpRequest extends HttpBase<HttpRequest> {
|
||||
return proxyAuth(HttpUtil.buildBasicAuth(username, password, charset));
|
||||
}
|
||||
|
||||
/**
|
||||
* 令牌验证,生成的头类似于:"Authorization: Bearer XXXXX",一般用于JWT
|
||||
*
|
||||
* @param token 令牌内容
|
||||
* @return HttpRequest
|
||||
* @since 5.5.3
|
||||
*/
|
||||
public HttpRequest bearerAuth(String token) {
|
||||
return auth("Bearer " + token);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证,简单插入Authorization头
|
||||
*
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user