-
Notifications
You must be signed in to change notification settings - Fork 4
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
Calling an action fails when sending a Content-Type header #26
Comments
@sduplooy1 I've had on my list for a while to push out some updates from work we've done on this internally - might include a fix for this, I need to check. (I recall seeing this issue at some point too.) From your perspective is this an annoyance or a major issue? |
Well it makes things a bit complicated calling actions from Angular, but I
think we have a workaround for now.
In the class %pkg.isc.rest.model.action.t.action, we updated the Generate()
method to default the expected content type:
Changed
Set pExpectedContentType = ""
to:
Set pExpectedContentType = "application/json"
This seems to fix the problem for us, but not sure what the impact of this
is on other types of actions/methods.
…On Thu, Feb 8, 2024 at 3:22 PM Tim Leavitt ***@***.***> wrote:
@sduplooy1 <https://github.com/sduplooy1> I've had on my list for a while
to push out some updates from work we've done on this internally - might
include a fix for this, I need to check. (I recall seeing this issue at
some point too.)
From your perspective is this an annoyance or a major issue?
—
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA54QHGJ22CIDRK4VE43KQ3YSTGSHAVCNFSM6AAAAABC7XHS46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUGEYTMNBRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I don't think that's the proper fix. When I've seen this before the issue has been setting the Content-Type header when there isn't actually any content (e.g., for a GET request) - can you confirm that's the case? |
Yes correct.
A test scenario is in the phonebook sample, when you do a GET to the
$find-by-phone action:
GET:
http://localhost:52773/csp/ISC-REST/phonebook-sample/api/contact/$find-by-phone?phoneFragment=962
If Content-Type is set it fails.
…On Thu, Feb 8, 2024 at 3:40 PM Tim Leavitt ***@***.***> wrote:
I don't think that's the proper fix. When I've seen this before the issue
has been setting the Content-Type header when there isn't actually any
content (e.g., for a GET request) - can you confirm that's the case?
—
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA54QHFMKC47KEROEM5PRTLYSTIVTAVCNFSM6AAAAABC7XHS46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUGE2DMOBTGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Reviewing our internally-logged issues, the corresponding one to this is still open. (Internal reference is APPS-19676.) |
When calling an action and sending a Content-Type header the server always responds with 406-Not Acceptable. If the Content-Type header is removed then the actions work fine.
The text was updated successfully, but these errors were encountered: