File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1083,7 +1083,7 @@ public final class XxxApi implements IRequestApi {
10831083
10841084#### 如何传入动态的请求头
10851085
1086- * 定义一个字段 ,并在上面添加 `@HTTPHeader ` 注解即可
1086+ * 传入一个 ` HashMap ` 类型的字段 ,并在上面添加 `@HTTPHeader ` 注解即可
10871087
10881088```java
10891089public final class XxxApi implements IRequestApi {
@@ -1094,14 +1094,14 @@ public final class XxxApi implements IRequestApi {
10941094 return " xxx/xxxx" ;
10951095 }
10961096
1097- @HttpHeader
1098- private String time ;
1097+ @HTTPHeader
1098+ private HashMap< String , String > headers ;
10991099}
11001100```
11011101
11021102#### 如何重命名参数或者请求头的名称
11031103
1104- * 传入一个 HashMap 类型的字段,并在上面添加 ` @HTTPHeader ` 注解即可
1104+ * 给字段加上 ` @HttpRename ` 注解即可,则可以修改参数名的值,如果没有加上此注解,则框架默认使用字段名作为参数名
11051105
11061106```java
11071107public final class XxxApi implements IRequestApi {
@@ -1112,8 +1112,8 @@ public final class XxxApi implements IRequestApi {
11121112 return " xxx/xxxx" ;
11131113 }
11141114
1115- @HTTPHeader
1116- private HashMap< String , String > headers ;
1115+ @HttpRename ( " k " )
1116+ private String keyword ;
11171117}
11181118```
11191119
You can’t perform that action at this time.
0 commit comments