Skip to content

Commit

Permalink
Add VERSION constant in oneway.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
junwen-k committed Jun 2, 2020
1 parent ed73f5c commit f9daf99
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions oneway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ import {
OneWayError,
OneWayErrorType,
} from "./error.ts";
import { version } from "./mod.json";

/**
* SDK Version constant.
*/
const VERSION = "0.1.2";

// Based on specifications found in http://smsd2.onewaysms.sg/api.pdf.
export class OneWay implements OneWayClient {
Expand Down Expand Up @@ -122,7 +126,7 @@ export class OneWay implements OneWayClient {
*/
private async getRequest(requestURL: string): Promise<Response> {
const headers = new Headers();
headers.append("User-Agent", `onewaysms-sdk-deno/${version}`);
headers.set("User-Agent", `onewaysms-sdk-deno/${VERSION}`);
return fetch(requestURL, {
headers,
});
Expand Down

0 comments on commit f9daf99

Please sign in to comment.