Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface JupyterAjaxResponse<ResponseType, ErrorType>

RxJS's AjaxResponse sets response as any when we can declare the type returned.

This interface is meant to be internal, used as:

ajax('/api/contents') as Observable<JupyterAjaxResponse<Contents>>

or as

ajax('/api/contents').map(resp => {
if(resp.response.type === "notebook")
})

NOTE: the response can still be invalid and should likely be validated

Type parameters

  • ResponseType

  • ErrorType

Hierarchy

  • AjaxResponse
    • JupyterAjaxResponse

Index

Constructors

constructor

  • new JupyterAjaxResponse(originalEvent: Event, xhr: XMLHttpRequest, request: AjaxRequest): JupyterAjaxResponse
  • Parameters

    • originalEvent: Event
    • xhr: XMLHttpRequest
    • request: AjaxRequest

    Returns JupyterAjaxResponse

Properties

originalEvent

originalEvent: Event

request

request: AjaxRequest

response

response: ResponseType | ErrorType

responseText

responseText: string
type

{string} The raw responseText

responseType

responseType: string
type

{string} The responseType (e.g. 'json', 'arraybuffer', or 'xml')

status

status: number
type

{number} The HTTP status code

xhr

xhr: XMLHttpRequest

Generated using TypeDoc