GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs
  • Tutorials
  • Playground
  • Reference
  • code
  • ResourceParamsContext
  • HttpResourceOptions
  • HttpResourceRef
  • HttpResourceRequest

This view

  • Original page
  • New address

GeezerVison is showing next.angular.dev — HttpResourceFn • Angular

API

    
      interface HttpResourceFn {
<TResult = unknown>(url: (ctx: ResourceParamsContext) => string | undefined, options: HttpResourceOptions<TResult, unknown> & { defaultValue: NoInfer<TResult>; }): HttpResourceRef<TResult>; <TResult = unknown>(url: (ctx: ResourceParamsContext) => string | undefined, options?: HttpResourceOptions<TResult, unknown> | undefined): HttpResourceRef<TResult | undefined>; <TResult = unknown>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, unknown> & { defaultValue: NoInfer<TResult>; }): HttpResourceRef<TResult>; <TResult = unknown>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, unknown> | undefined): HttpResourceRef<TResult | undefined>;
}

Create a Resource that fetches data with an HTTP GET request to the given URL.

The resource will update when the URL changes via signals.

Uses HttpClient to make requests and supports interceptors, testing, and the other features of the HttpClient API. Data is parsed as JSON by default - use a sub-function of httpResource, such as httpResource.text(), to parse the response differently.

@paramurl(ctx: ResourceParamsContext) => string | undefined
@paramoptionsHttpResourceOptions<TResult, unknown> & { defaultValue: NoInfer<TResult>; }
@returnsHttpResourceRef<TResult>

Create a Resource that fetches data with an HTTP GET request to the given URL.

The resource will update when the URL changes via signals.

Uses HttpClient to make requests and supports interceptors, testing, and the other features of the HttpClient API. Data is parsed as JSON by default - use a sub-function of httpResource, such as httpResource.text(), to parse the response differently.

@paramurl(ctx: ResourceParamsContext) => string | undefined
@paramoptionsHttpResourceOptions<TResult, unknown> | undefined
@returnsHttpResourceRef<TResult | undefined>

Create a Resource that fetches data with the configured HTTP request.

The resource will update when the request changes via signals.

Uses HttpClient to make requests and supports interceptors, testing, and the other features of the HttpClient API. Data is parsed as JSON by default - use a sub-function of httpResource, such as httpResource.text(), to parse the response differently.

@paramrequest(ctx: ResourceParamsContext) => HttpResourceRequest | undefined
@paramoptionsHttpResourceOptions<TResult, unknown> & { defaultValue: NoInfer<TResult>; }
@returnsHttpResourceRef<TResult>

Create a Resource that fetches data with the configured HTTP request.

The resource will update when the request changes via signals.

Uses HttpClient to make requests and supports interceptors, testing, and the other features of the HttpClient API. Data is parsed as JSON by default - use a sub-function of httpResource, such as httpResource.text(), to parse the response differently.

@paramrequest(ctx: ResourceParamsContext) => HttpResourceRequest | undefined
@paramoptionsHttpResourceOptions<TResult, unknown> | undefined
@returnsHttpResourceRef<TResult | undefined>

Create a Resource that fetches data with the configured HTTP request.

The resource will update when the URL or request changes via signals.

Uses HttpClient to make requests and supports interceptors, testing, and the other features of the HttpClient API. Data is parsed into an ArrayBuffer.

Create a Resource that fetches data with the configured HTTP request.

The resource will update when the URL or request changes via signals.

Uses HttpClient to make requests and supports interceptors, testing, and the other features of the HttpClient API. Data is parsed into a Blob.

Create a Resource that fetches data with the configured HTTP request.

The resource will update when the URL or request changes via signals.

Uses HttpClient to make requests and supports interceptors, testing, and the other features of the HttpClient API. Data is parsed as a string.

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.