-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send array in Post Agent #11
Comments
Hi @asommer70 - could you please give an example of what you are trying to send that does not work? Thank you |
Sure, it's something like:
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. |
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, For key-value pairs, a JSON object would be needed, using braces '{', '}'. For example, |
You're totally right this is more of what I meant:
An array of key-value pairs. |
@asommer70 I see, thank you. Could you please share the error message that you get? (With any sensitive/personal/business information redacted please.) |
This is what I get from the service I'm posting the non-array to:
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. |
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. |
Hey all,
I was wondering how I can send a JSON array using a Post Agent? I can send a JSON object just fine, but an API I'm working with only accepts an array.
Thanks!
The text was updated successfully, but these errors were encountered: