conjure-client v2.11.0
conjure-typescript-runtime
A light-weight Promise based HTTP client library for the browser.
Overview
conjure-typescript-runtime leverages fetch to provide a simple interface for making HTTP requests. conjure-typescript-runtime was designed to handle the RPC layer for clients generated by Conjure-TypeScript.
Browser compatibility: This library uses fetch so you should ensure that your runtime environment supports ES6 features.
Example
import { DefaultHttpApiBridge, MediaType } from "conjure-client";
import { SomeService } from "some-conjure-api";
const bridge = new DefaultHttpApiBridge({
baseUrl: "https://some.base.url.com",
userAgent: {
productName: "yourProductName",
productVersion: "1.0.0"
}
})
const service = new SomeService(bridge);
service.getSomeResult()
.then(function (response) {
// handle success
console.log(response);
})
.catch(function (error) {
// handle error
console.log(error);
})
.then(function () {
// always executed
});
Contributing
See the CONTRIBUTING.md document.
License
This project is made available under the Apache 2.0 License.
5 months ago
10 months ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago