# cdse

> CDS Extension for External Service Consumption

Latest version **1.1.12** (published 2021-03-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install cdse
pnpm add cdse
yarn add cdse
bun add cdse
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.12 |
| Published | 2021-03-18 |
| First published | 2020-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 21.9 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Jhodel Cailan |
| Maintainers | jcailan |
| Keywords | sap, cap, cds, axios |

## Links

- npm: https://www.npmjs.com/package/cdse
- Repository: https://github.com/jcailan/cdse
- Homepage: https://github.com/jcailan/cdse#readme
- Issues: https://github.com/jcailan/cdse/issues
- npm.io page: https://npm.io/package/cdse

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.21.1
- [@sap/cds](https://npm.io/package/@sap/cds.md) ^3.34.2
- [sap-cf-destconn](https://npm.io/package/sap-cf-destconn.md) 0.0.19

## Recent versions

- 1.1.12 (latest) — 2021-03-18
- 1.1.11 — 2021-03-18
- 1.1.7 — 2021-03-18
- 1.1.6 — 2021-03-18
- 1.1.4 — 2021-03-18
- 1.1.2 — 2021-03-18
- 1.1.1 — 2020-08-02
- 1.1.0 — 2020-08-02
- 1.0.8 — 2020-08-01
- 1.0.7 — 2020-07-31
- 1.0.6 — 2020-07-30
- 1.0.5 — 2020-07-26
- 1.0.4 — 2020-07-26
- 1.0.3 — 2020-07-24
- 1.0.2 — 2020-07-23
- … 2 more at https://npm.io/package/cdse/versions

## README

# CDSE Node Module [![Build Status](https://travis-ci.com/jcailan/cdse.svg?branch=master)](https://travis-ci.com/jcailan/cdse)

## CDS Extension for External Service Consumption

This node module provides an alternative solution for consuming external services in a Cloud Application Programming (CAP) Model where the users can use the raw capabilities of **axios** node module while still utilizing the following capabilites of CAP framework:
- Fluent api concept
- Handling of Destination and Connectivity configurations
- CDS configuration found in **package.json**

## Installation

Using npm:

```swift
> npm install cdse
```

## Example

```javascript
const cdse = require("cdse");

const service = await cdse.connect.to("NorthWind");

// HTTP GET
let result = await service.run({
	url: "/Products"
});

// HTTP POST
result = await service.run({
	url: "/Products",
	method: "post",
	data: {
		ID: 1234,
		ProductName: "Milk"
	}
});

// HTTP POST with X-CSRF-Token protection
result = await service.run({
	url: "/Products",
	method: "post",
	data: {
		ID: 1234,
		ProductName: "Milk"
	},
	csrfProtection: true
});
```

---
_Source: https://npm.io/package/cdse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
