-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Milestone
Description
Problem
The side effect is still there. is responsible to handle the SetCookie beside the Header.
I suggest refactoring:
- Remove these lines:
const entries =
tab === TAB.SET_COOKIE
? SetCookie.getKeyValueArray(headers)
: convertObjToKeyValueArray(headers);
const nameValueSetCookie =
tab === TAB.SET_COOKIE ? SetCookie.getArrayNameValue(headers) : [];=> headers from dataProvider should be KeyValue[]
- Refactor all
headerDataProvider
https://github.com/ProxymanApp/proxyman-electron-app/blob/fcbcb1bc7a803c1fdb1bfd44d416646bed71296f/src/renderer/components/request-inspector.jsx#L66to
const headerDataProvider = () => {
return {
headers: convertObjToKeyValueArray(request.headers),
tab: TAB.HEADER,
};
};- Refactor the Form, Query, Cookie Data Provider too. Make sure the
headersisKeyValue[]