diff --git a/addon/web/client/src/components/ViewFlow.tsx b/addon/web/client/src/components/ViewFlow.tsx index 68841eb..0f3717d 100644 --- a/addon/web/client/src/components/ViewFlow.tsx +++ b/addon/web/client/src/components/ViewFlow.tsx @@ -34,7 +34,7 @@ class ViewFlow extends React.Component { const { flow } = this.props if (!flow) return null const response = flow.response - if(!response) return null + if (!response) return null if (!(response.body && response.body.byteLength)) { return
No response
@@ -62,6 +62,14 @@ class ViewFlow extends React.Component { const request = flow.request const response: IResponse = (flow.response || {}) as any + // Query String Parameters + const searchItems: Array<{ key: string; value: string }> = [] + if (flow.url && flow.url.search) { + flow.url.searchParams.forEach((value, key) => { + searchItems.push({ key, value }) + }) + } + return (
@@ -100,7 +108,7 @@ class ViewFlow extends React.Component { { !(flowTab === 'Headers') ? null :
-

+ }}>{this.state.copied ? 'Copied' : 'Copy as cURL'}

General

@@ -159,6 +167,22 @@ class ViewFlow extends React.Component {
+ { + !(searchItems.length) ? null : +
+

Query String Parameters

+
+ { + searchItems.map(({ key, value }) => { + return ( +

{key}: {value}

+ ) + }) + } +
+
+ } + { !(request.body && request.body.byteLength) ? null :
diff --git a/addon/web/client/src/message.ts b/addon/web/client/src/message.ts index 573b934..6a07cf4 100644 --- a/addon/web/client/src/message.ts +++ b/addon/web/client/src/message.ts @@ -55,7 +55,7 @@ export class Flow { public request: IRequest public response: IResponse | null = null - private url: URL + public url: URL private path: string private _size = 0 private size = '0'