functions-framework-java
functions-framework-java copied to clipboard
Not able to send xml message to local GCF, how?
How do I send an xml payload from file to local GCF? I don't want to base64, copy paste into json etc.
curl -vX POST http://localhost:8080 -H "Content-Type: text/json" -d @testmsg.json
testmsg.json
{
"context": {
"eventId":"1144231683168617",
"timestamp":"2020-05-06T07:33:34.556Z",
"eventType":"google.pubsub.topic.publish",
"resource":{
"service":"pubsub.googleapis.com",
"name":"projects/sample-project/topics/gcf-test",
"type":"type.googleapis.com/google.pubsub.v1.PubsubMessage"
}
},
"data": {
"@type": "type.googleapis.com/google.pubsub.v1.PubsubMessage",
"attributes": {
"attr1":"attr1-value"
},
"data": "@../ord/myorder.xml"
}
}

Does this work? https://stackoverflow.com/questions/3007253/post-xml-file-using-curl-command-line
This issue has been open for a while without update. If you're still experiencing an issue, please re-open with:
- What you tried.
- What you expected to happen.
- What actually happened instead.
That will help us better understand the root cause of the issue to propose a solution that'll work for you. Thanks!