🧠
ngx-crud
  • Introduction
  • API
    • HTTP Operations
    • HTTP Aborting
    • HTTP Caching
    • HTTP Observing
    • HTTP Options
    • HTTP Context
    • HTTP Headers
    • HTTP Params
    • Service Instance
    • Service Options
  • Reference
    • Modules
      • AbortModule
      • CacheModule
      • ObserveModule
      • CrudModule
    • Services
      • AbortService
      • CacheService
      • CommonService
      • CrudService
      • CustomService
      • DeleteService
      • FindService
      • GetService
      • ObserveService
      • PatchService
      • PostService
      • PutService
    • Interceptors
      • AbortInterceptor
      • CacheInterceptor
      • ObserveInterceptor
    • Decorators
      • @ApiUrl
      • @ApiRoute
    • Helpers
      • createUrl
      • createUrlWithId
      • stripUrlParams
  • Examples
    • Services
      • Fully Typed Collection
      • Limited Singleton
    • Components
      • Loader
    • Effects
      • ProfilerEffect
      • ErrorEffect
      • OfflineEffect
  • Links
    • GitHub
Powered by GitBook
On this page
  • Get
  • Set
  • Append
  • Clear
  1. API

HTTP Headers

Get

Get a single header of the service:

crudService.getHeader(name : string) : string

Get the headers instance of the service:

crudService.getHeaders() : HttpHeaders

Get values for a single header of the service:

crudService.getHeaderArray(name : string) : string[]

Set

Set a single header of the service:

crudService.setHeader(name : string, value : string) : this

Set the headers instance of the service:

crudService.setHeaders(headers : HttpHeaders) : this

Set values for a single header of the service:

crudService.setHeaderArray(name : string, valueArray : string[]) : this

Append

Append a single header to the service:

crudService.appendHeader(name : string, value : string) : this

Append values to a single header of the service:

crudService.appendHeaderArray(name : string, valueArray : string[]) : this

Clear

Clear a single header of the service:

crudService.clearHeader(name : string) : this

Clear the headers instance of the service:

crudService.clearHeaders() : this
PreviousHTTP ContextNextHTTP Params

Last updated 3 years ago