You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to send a patch request to a custom object using the javascript client and it seems that if the status doesn't exist I'm getting rejected. That's the code I'm using:
What I do to get around it is to make another call before sending the patch to check if the resource has a status subresource, and if it doesn't, I add an add operation at the start. But then I end up with 2 calls where I could have done it with one.
I've been trying to find a way to send it a merge patch, and to my understanding I need to change the Content-Type to application/merge-patch+json - but I couldn't find where to do it. Looking at the [code][1], I see that there's some internal logic to determine the Content-Type header, rather than taking it from the any argument in the call.
Is this a bug or am I doing something wrong? How can I patch the status of a resource that might not have a status yet (and do it with a single call)?
The text was updated successfully, but these errors were encountered:
I've been trying to send a patch request to a custom object using the javascript client and it seems that if the status doesn't exist I'm getting rejected. That's the code I'm using:
What I do to get around it is to make another call before sending the patch to check if the resource has a status subresource, and if it doesn't, I add an
add
operation at the start. But then I end up with 2 calls where I could have done it with one.I've been trying to find a way to send it a merge patch, and to my understanding I need to change the
Content-Type
toapplication/merge-patch+json
- but I couldn't find where to do it. Looking at the [code][1], I see that there's some internal logic to determine theContent-Type
header, rather than taking it from the any argument in the call.Is this a bug or am I doing something wrong? How can I patch the status of a resource that might not have a status yet (and do it with a single call)?
The text was updated successfully, but these errors were encountered: