Skip to content

Commit

Permalink
#585: last feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
basmasking committed Jan 3, 2025
1 parent 8ef12a3 commit b799f18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/http/src/FetchHttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import HttpClient from './interfaces/HttpClient';

export default class FetchHttpClient implements HttpClient
{
async execute(url: string, options: object): Promise<Response>
async execute(url: string, options?: RequestInit): Promise<Response>
{
return fetch(url, options);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/http/src/HttpRemoteBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export default class HttpRemoteBuilder implements RemoteBuilder
{
readonly #httpClient: HttpClient;

constructor()
constructor(httpClient: HttpClient = new FetchHttpClient())
{
this.#httpClient = new FetchHttpClient();
this.#httpClient = httpClient;
}

build(url: string): Remote
Expand Down
2 changes: 1 addition & 1 deletion packages/http/src/interfaces/HttpClient.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

interface HttpClient
{
execute(url: string, options: object): Promise<Response>;
execute(url: string, options?: RequestInit): Promise<Response>;
}

export default HttpClient;

0 comments on commit b799f18

Please sign in to comment.