File tree 1 file changed +6
-6
lines changed
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 {
1083
1083
1084
1084
#### 如何传入动态的请求头
1085
1085
1086
- * 定义一个字段 ,并在上面添加 `@HTTPHeader ` 注解即可
1086
+ * 传入一个 ` HashMap ` 类型的字段 ,并在上面添加 `@HTTPHeader ` 注解即可
1087
1087
1088
1088
```java
1089
1089
public final class XxxApi implements IRequestApi {
@@ -1094,14 +1094,14 @@ public final class XxxApi implements IRequestApi {
1094
1094
return " xxx/xxxx" ;
1095
1095
}
1096
1096
1097
- @HttpHeader
1098
- private String time ;
1097
+ @HTTPHeader
1098
+ private HashMap< String , String > headers ;
1099
1099
}
1100
1100
```
1101
1101
1102
1102
#### 如何重命名参数或者请求头的名称
1103
1103
1104
- * 传入一个 HashMap 类型的字段,并在上面添加 ` @HTTPHeader ` 注解即可
1104
+ * 给字段加上 ` @HttpRename ` 注解即可,则可以修改参数名的值,如果没有加上此注解,则框架默认使用字段名作为参数名
1105
1105
1106
1106
```java
1107
1107
public final class XxxApi implements IRequestApi {
@@ -1112,8 +1112,8 @@ public final class XxxApi implements IRequestApi {
1112
1112
return " xxx/xxxx" ;
1113
1113
}
1114
1114
1115
- @HTTPHeader
1116
- private HashMap< String , String > headers ;
1115
+ @HttpRename ( " k " )
1116
+ private String keyword ;
1117
1117
}
1118
1118
```
1119
1119
You can’t perform that action at this time.
0 commit comments