@cloudpss/http-client
v0.5.43
Published
Http client for cloudpss APIs, use `@cloudpss/fetch` for http requests.
Downloads
116
Readme
@cloudpss/http-client
Http client for cloudpss APIs, use @cloudpss/fetch
for http requests.
Example
import { HttpClient, GqlVariable } from '@cloudpss/http-client';
const client = new HttpClient({ token: 'xxx' });
const data = await client.gql.query`
model(rid: ${GqlVariable('model/cloudpss/example', 'ResourceID!')}) {
rid
name
description
jobs
configs
}`;
const model = data.data.model;
// Do something with model...