I have an IBM Cloud Function like:
return {'body': csv_output.getvalue(),
'headers': {'Content-Type': 'text/csv',
'Content-Disposition': 'attachment;filename=dat.csv'}}
When called a public API endpoint it returns a csv file with right data.
But when I use postman to make a REST API endpoint call I get a weird result like:
{
"annotations": [
{
"key": "exec",
"value": "python:3.7"
},
{
"key": "web-export",
"value": true
},
{
"key": "final",
"value": true
},
{
"key": "raw-http",
"value": true
}
],
"exec": {
"kind": "python:3.7",
"code": "import
Can someone please tell me what am I doing wrong? Seems like I am getting code back rather than invoking the function.