Using robust methods for nonlinear approximation of functions via exponentials, we describe a new method for evaluating oscillatory integrals by computing their functional representation, i.e. by constructing a parametrized function representing the integral for all values of the parameter. The resulting function effectively replaces the integral within any user-supplied accuracy and can be used in further computations. The cost of constructing such functional representations of oscillatory integrals and the cost of their evaluation either does not depend or depends only mildly on the size of the parameter responsible for the oscillatory behavior. We consider the classical Fourier-type integrals, \[ I\left(\omega\right)=\int f\left(x\right)e^{i\omega g\left(x\right)}dx,\,\,\,\omega>0, \] where we assume that real-valued functions $f$ and $g$ (usually referred to as the amplitude and phase) are smooth and only mildly oscillatory. We also consider non-traditional oscillatory integrals (the so-called ExpSin integrals, introduced by Condon, Deanos and Iserles),
\[ I^e\left(\omega\right)=\int f\left(x\right)e^{\tau\sin\omega\left(\alpha x+\beta\right)}dx,\,\,\,\,\omega\ge0, \] where \[ \alpha>0, \beta\in \mathbb{R}, \tau\in \mathbb{C}, \tau\ne0. \]