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:
Andrew Bastin
2024-10-03 20:26:30 +05:30
committed by GitHub
parent 0f27cf2d49
commit f75900ed30
106 changed files with 14636 additions and 609 deletions

View File

@@ -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

View File

@@ -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]