11import { invokeTauriCommand } from './helpers/tauri'
22
33export interface ClientOptions {
4- maxRedirections : boolean
4+ maxRedirections : number
55 connectTimeout : number
66}
77
@@ -115,7 +115,7 @@ export class Client {
115115 *
116116 * @return promise resolving to the response
117117 */
118- async get < T > ( url : string , options : RequestOptions ) : Promise < Response < T > > {
118+ async get < T > ( url : string , options ? : RequestOptions ) : Promise < Response < T > > {
119119 return this . request ( {
120120 method : 'GET' ,
121121 url,
@@ -134,8 +134,8 @@ export class Client {
134134 */
135135 async post < T > (
136136 url : string ,
137- body : Body ,
138- options : RequestOptions
137+ body ? : Body ,
138+ options ? : RequestOptions
139139 ) : Promise < Response < T > > {
140140 return this . request ( {
141141 method : 'POST' ,
@@ -156,8 +156,8 @@ export class Client {
156156 */
157157 async put < T > (
158158 url : string ,
159- body : Body ,
160- options : RequestOptions
159+ body ? : Body ,
160+ options ? : RequestOptions
161161 ) : Promise < Response < T > > {
162162 return this . request ( {
163163 method : 'PUT' ,
@@ -175,7 +175,7 @@ export class Client {
175175 *
176176 * @return promise resolving to the response
177177 */
178- async patch < T > ( url : string , options : RequestOptions ) : Promise < Response < T > > {
178+ async patch < T > ( url : string , options ? : RequestOptions ) : Promise < Response < T > > {
179179 return this . request ( {
180180 method : 'PATCH' ,
181181 url,
@@ -191,7 +191,7 @@ export class Client {
191191 *
192192 * @return promise resolving to the response
193193 */
194- async delete < T > ( url : string , options : RequestOptions ) : Promise < Response < T > > {
194+ async delete < T > ( url : string , options ? : RequestOptions ) : Promise < Response < T > > {
195195 return this . request ( {
196196 method : 'DELETE' ,
197197 url,
0 commit comments