Comments (7)
Hi @asommer70 - could you please give an example of what you are trying to send that does not work?
Thank you
from active_workflow.
Sure, it's something like:
["customerId": "2033412", "email": "[email protected]"]
I'm getting data from another API parsing the fields I need then sending that to a separate API using a Post Agent, but sending a JSON array doesn't work.
from active_workflow.
I am sorry in advance if I am missing anything obvious, but a JSON array is an ordered collection of values, separated by ','. For example, ["2033412", "[email protected]"]
.
For key-value pairs, a JSON object would be needed, using braces '{', '}'. For example, {"customerId": "2033412", "email": "[email protected]"}
.
from active_workflow.
You're totally right this is more of what I meant:
[{"customerId": "2033412", "email": "[email protected]"}, {"customerId": "2322", "email": "[email protected]"}]
An array of key-value pairs.
from active_workflow.
@asommer70 I see, thank you.
Could you please share the error message that you get? (With any sensitive/personal/business information redacted please.)
from active_workflow.
This is what I get from the service I'm posting the non-array to:
[ { "itemId": "100118", "zoneId": "Primary Zone", "retail1": "125", "body": "{\"code\":3,\"message\":\"The requested service is not valid.\"}", "headers": { "Content-Type": "application/json;charset=ISO-8859-1", "Content-Length": "58", "Date": "Fri, 18 Nov 2022 16:37:50 GMT" }, "status": 404 } ]
It has a generic error "The requested service is not valid." for anything it doesn't like. In this case it's due to a JSON object being sent to the server instead of an array.
from active_workflow.
Thank you for providing this example. This won't work as it is right now, because the Post agent doesn't support sending top-level JSON arrays. It could be done, but it is not in our plans at the moment. I will leave this issue open for future reference and perhaps @vidas has to add or ask something.
from active_workflow.
Related Issues (12)
- docker workflow isn't working HOT 1
- Security concern HOT 1
- AGPL-3.0-only HOT 2
- SMTP configuration
- Contribute back to Huginn? HOT 4
- Using alpine image HOT 2
- How to use credentials? HOT 6
- TCP Timeout for Remote Agents / Async HTTP HOT 1
- Remote Agent API: empty strings in errors or logs cause errors HOT 4
- Updating Remote Agent information/description HOT 4
- Application freezes when run with docker-compose since v0.9.9 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from active_workflow.