2.3.2 ā€¢ Published 5 years ago

@dcos/http-service v2.3.2

Weekly downloads
11
License
Apache-2.0
Repository
github
Last release
5 years ago

HTTP Service Build Status


šŸ‘©ā€šŸ”¬ Please be aware that this package is still experimental ā€” changes to the interface and underlying implementation are likely, and future development or maintenance is not guaranteed.


This package wraps connections managed by the @dcos/connection-manager package into an Observable.

Usage

import { request, stream } from "@dcos/http-service";

request("http://localhost:4200/payload.json")
  .retry(3)
  .subscribe({
    next: ({ code, message, response }) => console.log(code, message, response),
    error: ({ code, message, response }) => console.error(code, message, response),
    complete: () => console.log("complete")
  });

stream("http://localhost:4200/mesos/api/v1", {
  method: "POST",
  responseType: "text",
  body: JSON.stringify({ type: "SUBSCRIBE" }),
  headers: {
    "Content-Type": "application/json",
    "Accept": "application/json"
  }
})
  .subscribe({
    next: data => console.log(data),
    error: event => console.log(event),
    complete: () => console.log("complete")
  });
2.3.2

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago