Skip to content

refactor(http): reduce function args to single parameter with union type #2416

Description

@jeffbcross

The existing implementation signature of http (PR #2360) is: http(url, options), similar to the native fetch API. but this makes it difficult to compose http into an observable chain for use cases where options are also passed in:

someInputObservable
  .map(e => {
    headers: {
      timestamp: timeService.now()
    }, 
    url: `http://service/${e.target.value}`
  })
  .flatMapLatest(http) //would not work since first arg is expected to be url string

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions