Hello,
I've implemented a very simplistic CAP service that sends a request to a SAP S4 backend system to retrieve a file as a stream ( .../$value)
This a simplified version of my code in the request handler function :
const results = await _sendAxiosHttpRequest(
{
method: "GET",
url: "<service_path>/$value",
headers: oHeaders,
responseType: "stream",
maxContentLength: Infinity,
maxBodyLength: Infinity
},
<my_destination>);
return [{ value: results.data,
$mediaContentType: results.headers["content-type"],
$mediaContentDispositionType: results.headers["content-disposition"] }];
As you can see, i send the request using Axios and in debug mode I checked that this request to the S/4 backend is successful.
results.data is an object of type IncomingMessage (which is a readable stream)
The problem is that the response generated by the CAP service contains nothing. It returns an empty response.
Even the headers "content-type" and "content-disposition" are not set.
Do you have any Idea, why it's not working ?
Thank you for your help 🙂
Request clarification before answering.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.