Skip to content

Commit

Permalink
Fix transport creation to allow no options
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Sep 4, 2022
1 parent c52044b commit 650feff
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.ts
Expand Up @@ -49,15 +49,15 @@ export class AxiosTransport extends Transport {
headers?: AxiosRequestHeaders;
bodyAddons?: object;

constructor(opts: AxiosTransportOptions) {
constructor(opts: AxiosTransportOptions = {}) {
super(opts);
this.url = opts.url || opts.host || 'http://localhost:80';
this.path = opts.path || undefined;
this.auth = opts.auth || undefined;
this.authType = opts.authType || undefined;
this.path = opts.path;
this.auth = opts.auth;
this.authType = opts.authType;
this.method = opts.method || 'POST';
this.headers = opts.headers || undefined;
this.bodyAddons = opts.bodyAddons || undefined;
this.headers = opts.headers;
this.bodyAddons = opts.bodyAddons;
}

log(info: any, callback: () => void) {
Expand Down

0 comments on commit 650feff

Please sign in to comment.