# match

## Summary

Matches determine if a request "matches" a specified parameter. In [`rules`](match) they are used to see if individual requests should be routed to an upstream cluster.

### Example object

```javascript
{
  "kind": "/services/example/latest/",
  "behavior": "prefix",
  "from": "",
  "to": ""
}
```

### Fields

#### `kind`

One of:

* `cookie`: matches `from.value` against the _Cookie_ key `from.key` in the request
* `header`: matches `from.value` against the _Header_ key `from.key` in the request
* `query`: matches `from.value` against the _Query_ key `from.key` in the request

#### `behavior`

One of:

* `"exact"`
* `"regex"`
* `"range"`
* `"prefix"`
* `"suffix"`

Defaults to `exact`

#### `from`

`{"key": "", "value": ""}` pair specifying the source of the match.

#### `to`

`{"key": "", "value": ""}` pair specifying the new location to set based off the match.
