Skip to content
An HTTP bridge library for use in front end applications and generated conjure code
TypeScript Shell JavaScript
Branch: develop
Clone or download
Latest commit e81d662 Jan 31, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Excavator: Render CircleCI file using template specified in .circleci… Nov 20, 2018
.github Excavator: Update policy-bot config (#73) Oct 14, 2019
changelog Fix automation (#95) Jan 31, 2020
packages/conjure-client Safer buildQueryString (#94) Jan 16, 2020
.autorelease.yml Fix automation (#95) Jan 31, 2020
.bulldozer.yml Excavator: Render Bulldozer Bot config file (#72) Oct 15, 2019
.changelog.yml Create .changelog.yml (#69) Oct 2, 2019
.excavator.yml Excavator: Auto-label some excavator PRs (#76) Oct 17, 2019
.gitignore
.policy.yml Excavator: Update policy-bot config (#91) Dec 4, 2019
CONTRIBUTING.md add documentation (#14) Jul 8, 2018
LICENSE
README.md
lerna.json Convert to monorepo so top level is called conjure-typescript-runtime ( Oct 31, 2018
package.json Update dev dependencies (#48) Apr 8, 2019
versions.props Excavator: Upgrade dependencies (#86) Dec 3, 2019
yarn.lock Bump mixin-deep from 1.3.1 to 1.3.2 (#87) Dec 4, 2019

README.md

Autorelease

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.

You can’t perform that action at this time.