tie method
参数绑定
type
为发起网络请求时,参数所在的载体位置。默认为body 参数。
Implementation
Param tie(String key, dynamic value, {ParamType type = ParamType.body}) {
switch (type) {
case ParamType.body:
_bodyMap[key] = value;
break;
case ParamType.query:
_queryMap[key] = value;
break;
case ParamType.form:
_formMap[key] = value;
break;
case ParamType.path:
_pathMap[key] = value;
break;
case ParamType.header:
_headerMap[key] = value;
break;
default:
}
return this;
}