MCPcopy Create free account
hub / github.com/SplootCode/splootcode / ResponseViewerInfo

Function ResponseViewerInfo

packages/editor/src/runtime/response_viewer.tsx:156–180  ·  view source on GitHub ↗
(props: ResponseViewerProps)

Source from the content-addressed store, hash-verified

154}
155
156export function ResponseViewerInfo(props: ResponseViewerProps) {
157 const { response } = props
158
159 let rawContentType = undefined
160 if (response) {
161 rawContentType = getHeader(response.headers, 'content-type')
162 }
163
164 return (
165 <>
166 <Box mb="4">
167 <Text as="h2" fontWeight={'bold'} mb="1">
168 Status code
169 </Text>
170 <StatusCodeInfo statusCode={response?.statusCode} />
171 </Box>
172
173 <Box mb="4">
174 <Headers headers={response?.headers || {}} />
175 </Box>
176
177 <BodyInfo body={response?.body} rawContentType={rawContentType} />
178 </>
179 )
180}
181
182export interface ResponseViewerProps {
183 response: HTTPResponse

Callers

nothing calls this directly

Calls 1

getHeaderFunction · 0.85

Tested by

no test coverage detected