Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

conjure-client

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conjure-client - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

lib/errors/error.d.ts

8

lib/index.d.ts

@@ -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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc