dbeck121 / CPI-Helper-Chrome-Extension

56 stars 19 forks source link

Can't DELETE in Neo Environment #164

Closed DevGregor closed 5 months ago

DevGregor commented 5 months ago

I recently added a new Plugin "Unlock Plugin" (#163 ) and for some reason I the makeCallPormise function doesn't work in the Neo environment when the HTTP method "DELETE" is used.

I'm currently trying to figure out what the cause is but haven't found anything yet. In CF it works just fine.

dbeck121 commented 5 months ago

I will check too but I do not see a reason except for differences in API. Maybe you used a ring url? Some APIs use /itspaces in the name.

What is the error message?

DevGregor commented 5 months ago

I will check too but I do not see a reason except for differences in API. Maybe you used a ring url? Some APIs use /itspaces in the name.

What is the error message?

I tracked the used URL when manually unlocking an artifact with the Network tab and it is the same request. Note that I am also able to request all locked artifacts in both environments, so this should work.

The only difference I was able to make out was the following: CF -> /api/v1/IntegrationDesigntimeLocks('${resourceId}') Neo -> /api/v1/IntegrationDesigntimeLocks(ResourceId='${resourceId}')

The Neo version works for both but the response was always the same in the Neo environment, namely: 403 Forbidden

Am I using the makePromiseCall function the wrong way here? It might be an issue with the x-csrf-token or maybe that it isn't even added to the request?

DevGregor commented 5 months ago

It seems to have been related to the X-CSRF-Token. Fixed with #165