fix: correct fallback for URL retrieval in bruRequestToJson

This commit is contained in:
Siddharth Gelera
2025-09-17 13:19:18 +05:30
parent 3b9f6bc809
commit 1bbfa40ae4

View File

@@ -49,7 +49,7 @@ export const bruRequestToJson = (data: string | any, parsed: boolean = false): a
requestType === 'grpc-request'
? _.get(json, 'grpc.method', '')
: String(_.get(json, 'http.method') ?? '').toUpperCase(),
url: _.get(json, urlPath[requestType], urlPath.default),
url: _.get(json, urlPath[requestType], _.get(json, urlPath.default)),
headers: ['grpc-request','ws-request'].includes(requestType) ? _.get(json, 'metadata', []) : _.get(json, 'headers', []),
auth: _.get(json, 'auth', {}),
body: _.get(json, 'body', {}),