Skip to content

HTTP History

HTTPHistorySDK

HTTPHistorySDK = object

Utilities to interact with the HTTP History page.

Properties

addRequestEditorExtension()

addRequestEditorExtension: (extension: Extension) => void

Add an extension to the request editor.

Parameters
ParameterTypeDescription
extensionExtensionThe extension to add.
Returns

void

addRequestViewMode()

addRequestViewMode: (options: RequestViewModeOptions) => void

Add a custom request view mode.

Parameters
ParameterTypeDescription
optionsRequestViewModeOptionsThe view mode options.
Returns

void

addResponseEditorExtension()

addResponseEditorExtension: (extension: Extension) => void

Add an extension to the response editor.

Parameters
ParameterTypeDescription
extensionExtensionThe extension to add.
Returns

void

addToSlot

addToSlot: DefineAddToSlotFn<HTTPHistorySlotContent>

Add a component to a slot.

Param

The slot to add the component to.

Param

The content to add to the slot.

Example
ts
sdk.httpHistory.addToSlot(HTTPHistorySlot.ToolbarPrimary, {
  type: "Button",
  label: "My Button",
  icon: "my-icon",
  onClick: () => {
    console.log("Button clicked");
  },
});

sdk.httpHistory.addToSlot(HTTPHistorySlot.ToolbarPrimary, {
  type: "Custom",
  definition: MyComponent,
});

sdk.httpHistory.addToSlot(HTTPHistorySlot.ToolbarPrimary, {
  type: "Command",
  commandId: "my-command",
  icon: "my-icon",
});
getQuery()

getQuery: () => HTTPQL

Get the current HTTPQL query.

Returns

HTTPQL

The current HTTPQL query.

getScopeId()

getScopeId: () => ID | undefined

Get the current scope ID.

Returns

ID | undefined

The current scope ID.

scrollTo()

scrollTo: (id: ID) => void

Scrolls the HTTP History table to a specific entry.

Parameters
ParameterTypeDescription
idIDThe ID of the entry to scroll to.
Returns

void

setQuery()

setQuery: (query: HTTPQL) => void

Set the HTTPQL query that will be applied on the HTTP History table results.

Parameters
ParameterTypeDescription
queryHTTPQLThe HTTPQL query.
Returns

void

setScope()

setScope: (id: ID | undefined) => Promise<void>

Set the current scope.

Parameters
ParameterTypeDescription
idID | undefinedThe ID of the scope to set.
Returns

Promise<void>


HTTPHistorySlot

const HTTPHistorySlot: object

The slots in the HTTP History UI.

Type Declaration

ToolbarPrimary

readonly ToolbarPrimary: "toolbar-primary"

The toolbar.