UNPKG

570 BJavaScriptView Raw
1import { getUserAgent } from "universal-user-agent";
2import { VERSION } from "./version";
3const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;
4// DEFAULTS has all properties set that EndpointOptions has, except url.
5// So we use RequestParameters and add method as additional required property.
6export const DEFAULTS = {
7 method: "GET",
8 baseUrl: "https://api.github.com",
9 headers: {
10 accept: "application/vnd.github.v3+json",
11 "user-agent": userAgent,
12 },
13 mediaType: {
14 format: "",
15 previews: [],
16 },
17};