Skip to content

Commit

Permalink
Merge pull request #46 from oghmjos/main
Browse files Browse the repository at this point in the history
fixed connect() to call xmlrpc.createSecureClient() for  https connections if secure flag is set
  • Loading branch information
Nyaran authored Feb 6, 2022
2 parents 0fd5e81 + 7d24f4e commit d7cdcb9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/testlink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ export default class TestLink {
* Establish connection
*/
connect(): void {
this.rpcClient = xmlrpc.createClient({host: this.host, port: this.port, path: this.rpcPath});
const options = { host: this.host, port: this.port, path: this.rpcPath };
this.rpcClient = this.secure ?
xmlrpc.createSecureClient(options):
xmlrpc.createClient(options);
}

/* Attachments */
Expand Down

0 comments on commit d7cdcb9

Please sign in to comment.