# presentation-request

> The Augmented.js Next - Presentation Request Module.

Latest version **3.0.3** (published 2020-05-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install presentation-request
pnpm add presentation-request
yarn add presentation-request
bun add presentation-request
```

## 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 | 3.0.3 |
| Published | 2020-05-19 |
| First published | 2018-08-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 51.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bob Warren |
| Maintainers | thedocbwarren |
| Keywords | augmentedjs, presentation |

## Links

- npm: https://www.npmjs.com/package/presentation-request
- Repository: https://github.com/Augmentedjs/presentation-request
- Homepage: http://www.augmentedjs.com
- Issues: https://github.com/Augmentedjs/presentation-request/issues
- npm.io page: https://npm.io/package/presentation-request

## Recent versions

- 3.0.3 (latest) — 2020-05-19
- 3.0.2 — 2020-05-19
- 3.0.1 — 2020-05-18
- 3.0.0 — 2020-05-17
- 2.6.3 — 2019-11-25
- 2.6.2 — 2019-05-21
- 2.6.1 — 2018-11-12
- 2.6.0 — 2018-08-17
- 2.5.2 — 2018-08-10

## README

# presentation-request

Augmented.js Presentation Request Module

# API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [Configuration](#configuration)
    -   [uri](#uri)
        -   [Properties](#properties)
    -   [url](#url)
        -   [Properties](#properties-1)
    -   [contentType](#contenttype)
        -   [Properties](#properties-2)
    -   [dataType](#datatype)
        -   [Properties](#properties-3)
    -   [method](#method)
        -   [Properties](#properties-4)
    -   [method](#method-1)
        -   [Properties](#properties-5)
    -   [cache](#cache)
        -   [Properties](#properties-6)
    -   [timeout](#timeout)
        -   [Properties](#properties-7)
    -   [crossDomain](#crossdomain)
        -   [Properties](#properties-8)
    -   [withCredentials](#withcredentials)
        -   [Properties](#properties-9)
    -   [user](#user)
        -   [Properties](#properties-10)
    -   [password](#password)
        -   [Properties](#properties-11)
    -   [allowOrigins](#alloworigins)
        -   [Properties](#properties-12)
    -   [allowMethods](#allowmethods)
        -   [Properties](#properties-13)
    -   [headers](#headers)
        -   [Properties](#properties-14)
    -   [success](#success)
        -   [Properties](#properties-15)
    -   [error](#error)
        -   [Properties](#properties-16)
    -   [complete](#complete)
        -   [Properties](#properties-17)
    -   [beforeSend](#beforesend)
        -   [Properties](#properties-18)
    -   [mock](#mock)
        -   [Properties](#properties-19)
-   [xhrFields](#xhrfields)
-   [request](#request)
    -   [Parameters](#parameters)
    -   [Examples](#examples)
-   [sync](#sync)
    -   [Parameters](#parameters-1)

## Configuration

Object of configuration properties and callbacks.  Pass this to the request call to setup configutation

### uri

uri property

#### Properties

-   `uri` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the uri

### url

url property

#### Properties

-   `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the url

**Meta**

-   **deprecated**: This is deprecated.


### contentType

contentType property

#### Properties

-   `contentType` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the content type (default is text/plain)

### dataType

dataType property

#### Properties

-   `dataType` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the data type (default is text)

### method

async property - no longer supported

#### Properties

-   `async` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** set async (default true)

### method

method property

#### Properties

-   `method` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the ajax method (default GET)

### cache

cache property

#### Properties

-   `cache` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** the cache toggle (default true)

### timeout

timeout property

#### Properties

-   `timeout` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the timeout property

### crossDomain

crossDomain property - sets withCredentials to true

#### Properties

-   `crossDomain` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** the cross domain property

### withCredentials

withCredentials property

#### Properties

-   `withCredentials` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** the setting for credentails

### user

user property

#### Properties

-   `user` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the username for credentials

### password

password property

#### Properties

-   `password` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the password for credentials

### allowOrigins

allowOrigins property

#### Properties

-   `allowOrigins` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the allowed origins for crossDomain

### allowMethods

allowMethods property

#### Properties

-   `allowMethods` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the allowed methods for crossDomain

### headers

headers property

#### Properties

-   `headers` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** an object of headers (key, value)

### success

success callback

#### Properties

-   `success` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** a callback for success

### error

error callback

#### Properties

-   `error` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** a callback for error

### complete

complete callback

#### Properties

-   `complete` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** a callback after the ajax call

### beforeSend

beforeSend callback

#### Properties

-   `beforeSend` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** a callback before the ajax call

### mock

mock

#### Properties

-   `mock` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** a toggle to mock the ajax call

## xhrFields

xhrFields property

## request

AJAX capability using simple jQuery-like API<br/>
Supports the following object properties and features:

<ul>
<li>method</li>
<li>uri</li>
<li>contentType</li>
<li>dataType</li>
<li>beforeSend function</li>
<li>success callback</li>
<li>failure callback</li>
<li>complete callback</li>
<li>user</li>
<li>password</li>
<li>withCredentials</li>
<li>cache</li>
<li>timeout</li>
<li>mock - special flag for mocking response</li>
</ul>

### Parameters

-   `configuration` **[Configuration](#configuration)** object of configuration properties and callbacks.

### Examples

```javascript
request({
        uri: uri,
        contentType: "text/plain",
        dataType: "text",
        success: function (data, status) { ... },
        error: function (data, status) { ... }
    });
```

Returns **any** success or failure callback

**Meta**

-   **deprecated**: Use fetch or sync


## sync

Base sync method that can pass special augmented features

### Parameters

-   `method`   (optional, default `METHOD_MAP.READ`)
-   `model`  
-   `options`   (optional, default `{}`)

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