{"id":23328822,"url":"https://github.com/francescogabbrielli/angular2-xmlrpc","last_synced_at":"2025-08-22T22:33:21.544Z","repository":{"id":57179859,"uuid":"349819677","full_name":"francescogabbrielli/angular2-xmlrpc","owner":"francescogabbrielli","description":"An Angular (9+) service which provides XML-RPC communication methods.","archived":false,"fork":false,"pushed_at":"2024-01-03T10:46:43.000Z","size":31,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-09T00:54:02.253Z","etag":null,"topics":["angular2","xmlrpc"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/francescogabbrielli.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.txt","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-20T19:40:22.000Z","updated_at":"2023-12-30T16:18:20.000Z","dependencies_parsed_at":"2024-10-19T03:28:49.721Z","dependency_job_id":null,"html_url":"https://github.com/francescogabbrielli/angular2-xmlrpc","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.15384615384615385","last_synced_commit":"381eaa3e9964852c2141ee93f11830eb197c8a66"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescogabbrielli%2Fangular2-xmlrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescogabbrielli%2Fangular2-xmlrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescogabbrielli%2Fangular2-xmlrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescogabbrielli%2Fangular2-xmlrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/francescogabbrielli","download_url":"https://codeload.github.com/francescogabbrielli/angular2-xmlrpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230501167,"owners_count":18236060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular2","xmlrpc"],"created_at":"2024-12-20T21:17:42.090Z","updated_at":"2024-12-20T21:17:42.726Z","avatar_url":"https://github.com/francescogabbrielli.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular2-Xmlrpc\n\nAn Angular (9+) service which provides XML-RPC communication methods.\n\nThis library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.6. Dependencies are requiring Angular 9, but this can probably be easily adapted to anything greater or equal to Angular 2.\n\nThis is actually a port from the AngularJS library [Angular-Xmlrpc](https://github.com/ITrust/angular-xmlrpc). **NOTE**: IE support has been dropped altogether.\n\n## Installation\n\n    npm install angular2-xmlrpc --save\n\n\n## How to use it ?\n\n### Configuration\n\nFirst of all, add a dependency in your module:\n``` ts\nimport { XmlrpcModule } from 'angular2-xmlrpc'\n\n@NgModule({\n  ...\n  imports: [\n    ...\n    XmlrpcModule\n  ],\n  ...\n})\nexport class AppModule { }\n```\nYou can use it in your application as any other service, and inject it in the constructor as usual.\n``` ts\nimport { XmlrpcService } from 'angular2-xmlrpc'\n\nconstructor(..., private xmlrpc:XmlrpcService, ...) {\n}\n```\n### XML-RPC Call\nThere is only one main method to call an XML-RPC method. In order to pass parameters, you have to wrap them in an array:\n``` typescript\nconst xmlrpcCall = this.xmlrpc.callMethod(\n  'http://localhost:8080/xmlrpc/endpoint',\n  'method-name',\n  ['string-param-1', 1, {'obj-param-3': {val1: 1, val2: 'x'}}]\n)\n```\nThe XML response from the server is wrapped in an `Observable`, and can be parsed to a JS object with the `parseResponse` method:\n``` ts\nxmlrpcCall.subscribe(data =\u003e console.log(this.xmlrpc.parseResponse(data)))\n```\n\n### Custom Headers\nto set custom headers:\n``` ts\nthis.xmlrpc.setHeaders({\n  'Custom-Header-1': 'Value-1',\n  'Custom-Header-2': ['Value-2', 'Value-3', 'Value-4']\n})\n```\n- _Note_: this method returns an instance of [HttpHeaders](https://angular.io/api/common/http/HttpHeaders) that will be used in the Angular HTTP request\n\n\n## Build \u0026 Test (Developers)\n\nTo build the project create an angular workspace (or use an existing one). For example:\n\n    ng new ng-workspace --create-application false\n\nCreate the library project:\n\n    ng generate library angular2-xmlrpc\n\nfetch this repo from inside the project folder and buid it as library module from angular:\n\n    ng build angular2-xmlrpc \n    ng test angular2-xmlrpc","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancescogabbrielli%2Fangular2-xmlrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrancescogabbrielli%2Fangular2-xmlrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancescogabbrielli%2Fangular2-xmlrpc/lists"}