Skip to content

Commit

Permalink
FFApi
Browse files Browse the repository at this point in the history
  • Loading branch information
revenz committed Apr 22, 2024
1 parent 9174761 commit 16d3a00
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Scripts/Shared/FileFlowsApi.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Class that interacts with the FileFlows API
* @name FileFlows API
* @revision 7
* @revision 8
* @minimumVersion 24.4.1.3000
*/
export class FileFlowsApi
Expand All @@ -28,11 +28,11 @@ export class FileFlowsApi
fetchRemote(endpoint)
{
let url = this.getUrl('remote/' + endpoint);
Logger.ILog('Fetching remote: ' + url);
Logger.ILog('Fetching Remote: ' + url);

if(this.AccessToken)
{
Logger.ILog('Access Token: ' + this.AccessToken);
Logger.ILog('Using Access Token');
http.DefaultRequestHeaders.Add("x-token", this.AccessToken);
}
else
Expand All @@ -44,8 +44,6 @@ export class FileFlowsApi
{
let response = http.GetAsync(url).Result;
let responseBody = response.Content.ReadAsStringAsync().Result;
Logger.ILog('Status Code: ' + response.StatusCode);
Logger.ILog('Response: ' + responseBody);
if(response.IsSuccessStatusCode === false)
throw responseBody;
return responseBody;
Expand Down

0 comments on commit 16d3a00

Please sign in to comment.