feat: hoppscotch agent and agent interceptor (#4396)
Co-authored-by: CuriousCorrelation <CuriousCorrelation@gmail.com> Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
@@ -78,6 +78,7 @@ export type HoppAction =
|
||||
| "share.request" // Share REST request
|
||||
| "tab.duplicate-tab" // Duplicate REST request
|
||||
| "gql.request.open" // Open GraphQL request
|
||||
| "agent.open-registration-modal" // Open Hoppscotch Agent registration modal
|
||||
|
||||
/**
|
||||
* Defines the arguments, if present for a given type that is required to be passed on
|
||||
|
||||
@@ -38,7 +38,10 @@ export function getSuitableLenses(response: HoppRESTResponse): Lens[] {
|
||||
)
|
||||
return []
|
||||
|
||||
const contentType = response.headers.find((h) => h.key === "content-type")
|
||||
// Lowercase the content-type key because HTTP Headers are case-insensitive by spec
|
||||
const contentType = response.headers.find(
|
||||
(h) => h.key.toLowerCase() === "content-type"
|
||||
)
|
||||
|
||||
if (!contentType) return [rawLens]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user