Set custom value in Header for Api

Pankaj Kumar, modified 6 Years ago. Regular Member Posts: 101 Join Date: 7/27/14 Recent Posts
Hi All,I am using Liferay 6.2 EE and creating web service for some external use.My question is .Can we set custom header value in Liferay api.
Thanks,Pankaj Semwal
thumbnail
Mohammed Yasin, modified 6 Years ago. Liferay Master Posts: 593 Join Date: 8/8/14 Recent Posts
Hi, 
You can write a Servlet filter  for /api/jsonws/* and update the header as per your requirement in response.
You can refer below for creating servlet filter
http://www.liferaysavvy.com/2016/02/liferay-servlet-filter-hooks.html