Merge "LOG SQL dump files getting installed"
[sdnc/oam.git] / dgbuilder / dgeflows / node_modules / express / node_modules / vary / README.md
1 # vary
2
3 [![NPM Version](http://img.shields.io/npm/v/vary.svg?style=flat)](https://www.npmjs.org/package/vary)
4 [![Node.js Version](http://img.shields.io/badge/node.js->=_0.8-blue.svg?style=flat)](http://nodejs.org/download/)
5 [![Build Status](http://img.shields.io/travis/jshttp/vary.svg?style=flat)](https://travis-ci.org/jshttp/vary)
6 [![Coverage Status](https://img.shields.io/coveralls/jshttp/vary.svg?style=flat)](https://coveralls.io/r/jshttp/vary)
7 [![Gittip](http://img.shields.io/gittip/dougwilson.svg?style=flat)](https://www.gittip.com/dougwilson/)
8
9 Manipulate the HTTP Vary header
10
11 ## Install
12
13 ```sh
14 $ npm install vary
15 ```
16
17 ## API
18
19 ```js
20 var vary = require('vary')
21 ```
22
23 ### vary(res, field)
24
25 Adds the given header `field` to the `Vary` response header of `res`.
26 This can be a string of a single field, a string of a valid `Vary`
27 header, or an array of multiple fields.
28
29 This will append the header if not already listed, otherwise leaves
30 it listed in the current location.
31
32 ```js
33 // Append "Origin" to the Vary header of the response
34 vary(res, 'Origin')
35 ```
36
37 ### vary.append(header, field)
38
39 Adds the given header `field` to the `Vary` response header string `header`.
40 This can be a string of a single field, a string of a valid `Vary` header,
41 or an array of multiple fields.
42
43 This will append the header if not already listed, otherwise leaves
44 it listed in the current location. The new header string is returned.
45
46 ```js
47 // Get header string appending "Origin" to "Accept, User-Agent"
48 vary.append('Accept, User-Agent', 'Origin')
49 ```
50
51 ## Testing
52
53 ```sh
54 $ npm test
55 ```
56
57 ## License
58
59 [MIT](LICENSE)