@@ -183,6 +183,12 @@ public static void CallAPI(string endPoint, LootLockerHTTPMethod httpMethod, str
183
183
184
184
new LootLockerServerRequest ( endPoint , httpMethod , body , headers , callerRole : callerRole ) . Send ( ( response ) => { onComplete ? . Invoke ( response ) ; } ) ;
185
185
}
186
+
187
+ public static void CallAPI ( EndPointClass endpoint , string body = null , Action < LootLockerResponse > onComplete = null , bool useAuthToken = true ,
188
+ LootLocker . LootLockerEnums . LootLockerCallerRole callerRole = LootLocker . LootLockerEnums . LootLockerCallerRole . User )
189
+ {
190
+ CallAPI ( endpoint . endPoint , endpoint . httpMethod , body , onComplete : ( serverResponse ) => { LootLockerResponse . Serialize ( onComplete , serverResponse ) ; } , useAuthToken , callerRole ) ;
191
+ }
186
192
187
193
public static void CallDomainAuthAPI ( string endPoint , LootLockerHTTPMethod httpMethod , string body = null , Action < LootLockerResponse > onComplete = null )
188
194
{
@@ -225,6 +231,12 @@ public static void UploadFile(string endPoint, LootLockerHTTPMethod httpMethod,
225
231
226
232
new LootLockerServerRequest ( endPoint , httpMethod , file , fileName , fileContentType , body , headers , callerRole : callerRole ) . Send ( ( response ) => { onComplete ? . Invoke ( response ) ; } ) ;
227
233
}
234
+
235
+ public static void UploadFile ( EndPointClass endPoint , byte [ ] file , string fileName = "file" , string fileContentType = "text/plain" , Dictionary < string , string > body = null , Action < LootLockerResponse > onComplete = null ,
236
+ bool useAuthToken = true , LootLocker . LootLockerEnums . LootLockerCallerRole callerRole = LootLocker . LootLockerEnums . LootLockerCallerRole . User )
237
+ {
238
+ UploadFile ( endPoint . endPoint , endPoint . httpMethod , file , fileName , fileContentType , body , onComplete : ( serverResponse ) => { LootLockerResponse . Serialize ( onComplete , serverResponse ) ; } , useAuthToken , callerRole ) ;
239
+ }
228
240
229
241
#endregion
230
242
0 commit comments