conjure-client
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -17,5 +17,5 @@ /** | ||
*/ | ||
export { FetchBridgeImpl as DefaultHttpApiBridge } from "./httpApiBridge/fetchBridge/fetchBridgeImpl"; | ||
export * from "./httpApiBridge/fetchBridge/retryingFetch"; | ||
export * from "./httpApiBridge/error"; | ||
export * from "./httpApiBridge/httpApiBridge"; | ||
export { FetchBridge as DefaultHttpApiBridge } from "./fetchBridge"; | ||
export * from "./fetchBridge"; | ||
export * from "./httpApiBridge"; | ||
export * from "./errors"; |
@@ -22,6 +22,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var fetchBridgeImpl_1 = require("./httpApiBridge/fetchBridge/fetchBridgeImpl"); | ||
exports.DefaultHttpApiBridge = fetchBridgeImpl_1.FetchBridgeImpl; | ||
__export(require("./httpApiBridge/fetchBridge/retryingFetch")); | ||
__export(require("./httpApiBridge/error")); | ||
__export(require("./httpApiBridge/httpApiBridge")); | ||
var fetchBridge_1 = require("./fetchBridge"); | ||
exports.DefaultHttpApiBridge = fetchBridge_1.FetchBridge; | ||
__export(require("./fetchBridge")); | ||
__export(require("./httpApiBridge")); | ||
__export(require("./errors")); |
{ | ||
"name": "conjure-client", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "An HTTP bridge library for use in front end applications and generated conjure code", | ||
@@ -9,3 +9,3 @@ "sideEffects": false, | ||
"scripts": { | ||
"build": "npm-run-all clean compile", | ||
"build": "npm-run-all clean lint compile test", | ||
"circle-publish": "./scripts/circle-publish-npm", | ||
@@ -12,0 +12,0 @@ "clean": "rm -rf lib/*", |
# conjure-typescript-client | ||
An HTTP bridge library for use in front end applications and generated conjure code. | ||
A light-weight Promise based HTTP client library for the browser. | ||
### Compatibility notes | ||
## Overview | ||
__Browser compatibility__: This library uses ES6 features (namely, fetch). Ensure that your runtime environment supports ES6 features. | ||
conjure-typescript-client leverages [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to provide a | ||
simple interface for making HTTP requests. conjure-typescript-client was designed to handle the RPC layer for | ||
clients generated by [Conjure-TypeScript](https://github.com/palantir/conjure-typescript). | ||
__Browser compatibility__: This library uses fetch so you should ensure that your runtime environment supports ES6 features. | ||
## Example | ||
```typescript | ||
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](./CONTRIBUTING.md) document. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44260
17
705
45
2