-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathsent-response-headers.tsx
More file actions
45 lines (39 loc) · 1.41 KB
/
sent-response-headers.tsx
File metadata and controls
45 lines (39 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import * as React from 'react';
import { RawHeaders } from '../../types';
import {IncludeExcludeList} from '../../model/IncludeExcludeList';
import {
CollapsibleCardHeading,
ExpandableCardProps
} from '../common/card';
import { HeaderDetails } from '../view/http/header-details';
import { SendCardSection } from './send-card-section';
import { CollapsingButtons } from '../common/collapsing-buttons';
import { ExpandShrinkButton } from '../common/expand-shrink-button';
export interface ResponseHeaderSectionProps extends ExpandableCardProps {
requestUrl: URL;
headers: RawHeaders;
}
const HeadersIncludeExcludeList = new IncludeExcludeList<string>();
export const SentResponseHeaderSection = ({
requestUrl,
headers,
...cardProps
}: ResponseHeaderSectionProps) => {
return <SendCardSection {...cardProps}>
<header>
<CollapsingButtons>
<ExpandShrinkButton
expanded={cardProps.expanded}
onClick={cardProps.onExpandToggled}
/>
</CollapsingButtons>
<CollapsibleCardHeading onCollapseToggled={cardProps.onCollapseToggled}>
Response Headers
</CollapsibleCardHeading>
</header>
<HeaderDetails HeadersIncludeExcludeList={HeadersIncludeExcludeList}
requestUrl={requestUrl}
headers={headers}
/>
</SendCardSection>;
};