https://github.com/kontent-ai/core-sdk-angular-http-service
Angular implementation of IHttpService replacing Axios for HTTP communication.
https://github.com/kontent-ai/core-sdk-angular-http-service
kontent-ai kontent-ai-tool
Last synced: about 1 year ago
JSON representation
Angular implementation of IHttpService replacing Axios for HTTP communication.
- Host: GitHub
- URL: https://github.com/kontent-ai/core-sdk-angular-http-service
- Owner: kontent-ai
- License: mit
- Archived: true
- Created: 2019-10-08T08:11:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-22T12:46:16.000Z (over 1 year ago)
- Last Synced: 2025-04-26T17:01:59.505Z (about 1 year ago)
- Topics: kontent-ai, kontent-ai-tool
- Language: TypeScript
- Homepage:
- Size: 2.82 MB
- Stars: 1
- Watchers: 14
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[](https://github.com/kontent-ai/core-sdk-angular-http-service/actions/workflows/main.yml)
[](https://github.com/kontent-ai/core-sdk-angular-http-service/blob/master/LICENSE.md)
[](https://discord.gg/SKCxwPtevJ)
[](https://github.com/kontent-ai/core-sdk-angular-http-service/issues)
# Angular Http service
This is an implementation of the `IHttpService` that can be used instead of the default http service available in [Core package](https://www.npmjs.com/package/@kontent-ai/core-sdk) that uses `axios` package.
This library uses Angular's `HttpClient` to make http requests and can be used only in Angular applications.
## Why and when should you use this library?
If you need to use `server side rendering with prerender` using Angular universal, you have to use Angular's built-in Http service because otherwise Angular will not wait until the requests are fetched from server and therefore your code would not be reflected in HTML of your page.
## Example
```typescript
import { AngularHttpService } from '@kontent-ai/core-sdk-angular-http-service';
const deliveryClient = new DeliveryClient({
projectId: 'xyz',
httpService: new AngularHttpService()
});
```