Skip to content

Commit

Permalink
Merge pull request #35 from ryunix/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
tuna2134 authored Aug 18, 2023
2 parents 1e6a614 + 27fcaa4 commit 7b08a48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { synthesisParams } from "./types/synthesis";

type fetchOptions = {
method: string;
headers?: Record<string, string>;
body?: any;
};

Expand All @@ -29,6 +30,7 @@ export class RestAPI {
method: method,
};
if (options.body) {
fetch_options["headers"] = { "Content-Type": "application/json" };
fetch_options["body"] = JSON.stringify(options.body);
}
let response = await fetch(url, fetch_options);
Expand Down

0 comments on commit 7b08a48

Please sign in to comment.