You can translate the question and the replies:

Base view from HTTP with headers but no payload/body

I have a JSON data source which first needs an authentication call (HTTP POST), that returns the session cookie to be used in consecutive (HTTP GET) calls. Unfortunately the first POST call doesn't return any HTTP body, so I can't create a base view. Error : "Unable to obtain the data structure:"... The data source is standard SW and the API can't be changed by us. Is there a way to e.g. move the cookie from header to the body so its possible to create base view and use the value for next calls? regards Michal
user
18-08-2023 07:54:25 -0400
code

1 Answer

Hi, When creating a base view from a JSON data source via an HTTP Client request, the HTTP body in the response is mandatory for the Virtual DataPort server to create the schema of the base view. As of now, the functionality to retrieve the header values as part of the output result is not supported. An alternative approach to solving your scenario is by [developing a custom wrapper](https://community.denodo.com/docs/html/browse/8.0/en/vdp/developer/developing_extensions/developing_custom_wrappers/developing_custom_wrappers#developing-custom-wrappers) in Java to capture the response of HTTP headers and import it into the Virtual DataPort server. You can also refer to the answer in a similar question here: [Retrieve header from http client request](https://community.denodo.com/answers/question/details?questionId=9064u000000L8GjAAK&title=Retieve+header+from+http+client+request). Hope this helps!
Denodo Team
21-08-2023 21:28:55 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here