defaults.js 570 B

1234567891011121314151617
  1. import { getUserAgent } from "universal-user-agent";
  2. import { VERSION } from "./version";
  3. const 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.
  6. export 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. };