Hi, is there a trick im missing on response operations ? (ive been able to transform responses all the time but this case might be different)
the case:
1. my backend is a DELETE endpoint that responds a 204 for success and responds no content. (no message no json, empty)
2. In the response area, I do my usua response transformation where I identify the no content case.
in that case in JS i did
context.setVariable("response.content",JSON.stringify(myResponse));
3. I see in the trace the data I sent in myResponse. but the client in postman still gets 204 and empty data.
4. I thought. maybe this is a bug and I really need to do the Add Message policy
so I did as well affecting the message.content
I can see both approaches working in the trace, but postman still receives the same response as the backend : 204 empty
any thought?
Solved! Go to Solution.
when you set the response.content,
are you also setting the response.status.code ?
204 = No Content
It's possible that because the status code is 204, Apigee Edge is ignoring whatever you put into response.content. I suppose you'd want a 200 if you are returning a message body.
when you set the response.content,
are you also setting the response.status.code ?
204 = No Content
It's possible that because the status code is 204, Apigee Edge is ignoring whatever you put into response.content. I suppose you'd want a 200 if you are returning a message body.
very great idea! ill try out at some point today
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 |