{"repo":"ServiceStack/servicestack-client","free":true,"listed":false,"github":"https://github.com/ServiceStack/servicestack-client","clone":"git clone https://github.com/ServiceStack/servicestack-client.git","description":"ServiceStack Service Client, Server Events and validation library","language":"TypeScript","stars":21,"topics":["servicestack","typescript","javascript","typed","generic","service-client","authentication"],"license":"BSD-3-Clause","category":"auth-billing-email","readme_excerpt":"@servicestack/client The @servicestack/client library enables the best end-to-end typed developer experience for calling ServiceStack APIs in any TypeScript or JavaScript project. v2.x Changes - Switched to use /api pre-defined route by default, revert to legacy /json/reply pre-defined route with: - @servicestack/client now dependency-free As fetch is available in Node.js v18+ LTS all polyfills have been removed to make @servicestack/client dependency-free in its latest major v2.x version. This should have no effect when using JsonServiceClient in Browsers which uses its native fetch() or from Node.js v18+ that now has native fetch support. ServerEventsClient in Node.js Node.js projects using ServerEventsClient (e.g. in tests) now require a polyfill: Then polyfill with: JsonServiceClient in Node.js includes. JsonServiceClient To create JsonServiceClient instances in v6+ projects using the JSON /api route use: Where it's configured to not use any JSON HTTP Headers to enable more efficient CORS requests without preflight requests. Alternatively all other projects can use the default constructor: API Reference API method The api returns a typed ApiResult Value Result that encapsulates either a Typed Response or a structured API Error populated in ResponseStatus allowing you to handle API responses programmatically without try/catch handling: Simplified API Handling Being able to treat errors as values greatly increases the ability to programmatically handle and genericize api ha","default_branch":null,"files":null,"tree":[],"storefront":"/r/ServiceStack","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ServiceStack/servicestack-client/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}