File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ import * as React from 'react' ;
2
+
3
+ import { HtkRequest } from '../../types' ;
4
+ import { styled } from '../../styles' ;
5
+
6
+ import { Pill } from './pill' ;
7
+
8
+ export const HttpVersionPill = styled ( ( { request, className } : {
9
+ request : HtkRequest
10
+ className ?: string
11
+ } ) => request . httpVersion
12
+ ? < Pill
13
+ title = { `The client sent this request using HTTP ${ request . httpVersion } ` }
14
+ > HTTP/{
15
+ request . httpVersion === '2.0'
16
+ ? '2'
17
+ : request . httpVersion
18
+ } </ Pill >
19
+ : null
20
+ ) `` ;
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import {
32
32
} from '../../common/text-content' ;
33
33
import { DocsLink } from '../../common/docs-link' ;
34
34
import { SourceIcon } from '../../common/source-icon' ;
35
+ import { HttpVersionPill } from '../../common/http-version-pill' ;
35
36
import { HeaderDetails } from './header-details' ;
36
37
import { UrlBreakdown } from '../url-breakdown' ;
37
38
@@ -164,6 +165,7 @@ export const HttpRequestCard = observer((props: HttpRequestCardProps) => {
164
165
/>
165
166
}
166
167
< SourceIcon source = { request . source } />
168
+ < HttpVersionPill request = { request } />
167
169
< Pill color = { getSummaryColour ( exchange ) } >
168
170
{ exchange . isWebSocket ( ) ? 'WebSocket ' : '' }
169
171
{ request . method } {
You can’t perform that action at this time.
0 commit comments