Skip to content

Commit

Permalink
linte-lib-xmlrpc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
00Kadie00 committed Jul 7, 2024
1 parent 95f9b9c commit 87ec512
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 0 additions & 3 deletions projects/typescript-xmlrpc/src/lib/deserializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ function convertParams(element: Element): Array<Param> {
}
const params: Array<Param> = [];
// Below ignore is due to: https://stackoverflow.com/a/22754453/4730773
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < methodResponseChildren.length; i++) {
params.push(convertParam(methodResponseChildren[i]));
}
Expand Down Expand Up @@ -202,7 +201,6 @@ function convertArray(element: Element): XmlRpcArray {
const result: XmlRpcArray = { data: []};
const dataChildren = arrayChildren[0].children;
// Below ignore is due to: https://stackoverflow.com/a/22754453/4730773
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < dataChildren.length; i++) {
result.data.push(convertValue(dataChildren[i]));
}
Expand All @@ -216,7 +214,6 @@ function convertStruct(element: Element): XmlRpcStruct {
const collection = element.children;
const result: Array<Member> = [];
// Below ignore is due to: https://stackoverflow.com/a/22754453/4730773
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < collection.length; i++) {
result.push(convertMember(collection[i]));
}
Expand Down
14 changes: 9 additions & 5 deletions projects/typescript-xmlrpc/src/lib/typescript-xmlrpc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,23 @@ import { deserialize } from './deserializer';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';


const BODY = 'body';
const TEXT = 'text';

@Injectable({
providedIn: 'root'
})
export class AngularXmlrpcService {
private readonly http: HttpClient;
private url: URL;
private headers: any;
private headers: object;

static instanceOfMethodResponse(object: any): object is MethodResponse {
static instanceOfMethodResponse(object: object): object is MethodResponse {
return 'value' in object;
}

static instanceOfMethodFault(object: any): object is MethodFault {
static instanceOfMethodFault(object: object): object is MethodFault {
return 'faultCode' in object && 'faultString' in object;
}

Expand Down Expand Up @@ -61,8 +65,8 @@ export class AngularXmlrpcService {
const options: object = {
headers: httpOptions,
reportProgress: false,
observe: 'body' as 'body',
responseType: 'text' as 'text',
observe: BODY,
responseType: TEXT,
withCredentials: false
};

Expand Down

0 comments on commit 87ec512

Please sign in to comment.