imageKnife header请求头联调图片修改2
Signed-off-by: 张琥珀 <zhanghupo3@h-partners.com>
This commit is contained in:
parent
db6396795b
commit
1c59a7a5c9
|
@ -61,14 +61,14 @@ export interface DetachFromLayout{
|
|||
|
||||
export class RequestOption {
|
||||
// 遍历添加图片http请求头
|
||||
map: Map<string, Object> = new Map<string, Object>();
|
||||
headers: Map<string, Object> = new Map<string, Object>();
|
||||
// RequestOption调用header对于的方法
|
||||
addHeader(key: string, value: Object) {
|
||||
this.map.set(key, value);
|
||||
this.headers.set(key, value);
|
||||
}
|
||||
// 全局调用header对应的方法,包含RequestOption的形式
|
||||
addHeaderMap(map: Map<string, Object>) {
|
||||
this.map = map;
|
||||
this.headers = map;
|
||||
}
|
||||
|
||||
uuid:string ='' // 唯一标识
|
||||
|
|
|
@ -60,12 +60,10 @@ export class HttpDownloadClient implements IDataFetch {
|
|||
onComplete(combineArray)
|
||||
})
|
||||
|
||||
console.log('refer' + JSON.stringify(request.map.get('refer')))
|
||||
const headerObj: Record<string, Object> = {}
|
||||
request.map.forEach((value, key) => {
|
||||
request.headers.forEach((value, key) => {
|
||||
headerObj[key] = value
|
||||
})
|
||||
console.log('referHeader' + JSON.stringify(headerObj))
|
||||
httpRequest.requestInStream(
|
||||
request.loadSrc as string,
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue