-
Notifications
You must be signed in to change notification settings - Fork 119
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
Params with a "null" value are not included in request. #495
Comments
right now to send a parameter with an empty key you need to pass would that work for you in this scenario? |
i did a little testing and i was not able to reproduce the behavior you described. for me, this syntax results in an error addItemJsonData({
authentication,
id,
data: null,
});
i just opened #496 with a tweak that resolves the error, but does not get to the root of your problem. with those changes:
I assume the second option is what you want. Unfortunately, the Portal API appears to ignore addItemJsonData({
authentication,
id,
data: "",
params: { clearEmptyFields: true }
}); because of the hair pulling i did in #474, i can safely say that |
Thanks @jgravois. I was originally testing by looking at the output in AGO Assistant. With further investigation on my end, it looks like passing The empty text string is probably what we want. I'll submit an issue with the Portal API team to get this added. I'll close this issue for now. |
i feel you there. i've been tricked doing that too. |
I'm using the
updateItem
method to set theitemDetails
anditemData
on a Story Map. If a user clicks "Unpublish", we need to remove thisitemData
. This should be able to be accomplished with the following:However, the
text: null
is never included as a param in the request.Currently, I have to make a second request if I want to update the itemDetails and remove the itemData at the same time:
The text was updated successfully, but these errors were encountered: