madsm01

Headers in response

Discussion created by madsm01 Employee on Jan 2, 2014
How about adding a java step just before respond and after response lookup/selection step that has

/** code start */
import com.itko.lisa.vse.stateful.model.TransientResponse;
import java.util.List;

List list = (List)testExec.getStateValue("lisa.vse.response");

TransientResponse response = (TransientResponse)list.get(0);
response.setBinary(true);
response.getMetaData().setParameterValue("Content-Type","whatever/you/want");

return response.getMetaData().toString();

/** code end */


Bhavin

Custom Response DPH would be the way to go or you can programmatically load the VSI (using ServiceImageContext) and add the necessary headers after the vsi has been created.

Ramana Telukutla


Thanks Ken. We wanted to automate it because the client is going to be using ServiceImageManager for creation of the models and not so much the UI.


Regards,
Smruthi Madhugiri



You can add a header in the response tab meta data, for example:

[cid:image001.png@01CEFD8F.AD3538A0]


Courtney Ball


From: Avery, Ken

You can manually modify the content type for responses on the Meta-Data tab of the response editor. Not sure if manual updates are acceptable for your project or not...

From: <Madhugiri>, Smruthi K <Smruthi.Madhugiri@ca.com<mailto:Smruthi.Madhugiri@ca.com>>

Hi All,

We have a requirement where the client wants to know if we can have headers in the response to add may something like a 'content-type'.

While recording I am aware that LISA automatically captures the response headers as well, but if we are using Request/Response pairs, does anybody already have a solution or know how to handle that?



Thank you.

Regards,

Smruthi Madhugiri

Outcomes