Applying fourier transform with respect to $x$ so that $u(x,y)\to \hat{u}(k,y)$ the PDE becomes
$$\begin{cases}
-k^2\hat{u}+\hat{u}_{yy}=0\\
\hat{u}_{y=0}=\hat{g}(k)
\end{cases}$$
This PDE has general solution $\hat{u}=A(k)e^{-|k|y}+B(k)e^{|k|y}$. We drop the second term because it goes unbounded. Now applying the B.C. we see that $\hat{g}(k)=A(k)$. So we compute $\hat{g}(k)$:
$$\hat{g}(k)=\frac{1}{2\pi}\int_{-1}^1e^{-ikx}\,dx=\frac{1}{2\pi}\int_0^1 e^{-ikx}+e^{ikx}\,dx=\frac{1}{\pi}\int_0^1 \cos(kx)\,dx=\frac{\sin k}{k\pi}$$
Where in the middle we have split the integral in two parts and did a change of variables $x\to -x$ in the second one. Now we just need to apply IFT for the solution:
$$u(x,y)=\frac{1}{\pi}\int_{-\infty}^\infty \frac{\sin k}{k}e^{-|k|y+ikx}\,dk$$