# Http Headers and Date Math

> describption goes here

Source: https://orbitalhq.com/changelog/2024-01-05-http-headers-date-math
Date: 2024-01-05
Version: 0.26.0

## Http Headers
The `@HttpHeader` annotation now is now supported, for setting headers on HTTP requests.

For example:

```taxi
service MyService {
  @HttpOperation(method = "GET", url = "...")
 
  // A fixed, static header
  @HttpHeader(name = "Consumes", value = "application/json")
  operation findPeople():Person[]

  // A header that's calculated
  operation findPeople(
     @HttpHeader(name = "If-Modified-Since") ifModifiedSince : Instant = addDays(now(),-7)
  ):Person[]
}
```

You can also pass header values in using the `given {}` clause in a query:

```taxi
service MyService {
  operation findPeople(
     @HttpHeader(name = "Cache-Control", prefix = "max-age=") cacheMaxAge : CacheMaxAge
  ):Person[]
}

// which is then invoked as:
given { maxAge : CacheMaxAge = 64000 } 
find { Person[] }
```

Read more about it in our [docs](/docs/describing-data-sources/http#http-headers)

## Date math
The stdlib in Taxi has been expanded to add date math functions to the stdlib:

 * `addMinutes`
 * `addDays`
 * `addSeconds`
 * `now`
 * `parseDate`

Read more about these in the [Taxi docs](https://taxilang.org/language-reference/stdlib/#dates)
