Server side Plugin Actions returen "Cannot Get" error

Hi Fellas,

I create my onw plugin which Post some data to server.
It works well in postman but my Plugin Actions code does not work.

Here are my actions code. It returns
{“message”:“Cannot GET /you API url”,“error”:“Not Found”,“statusCode”:404}
Can I ask what is problem?

the error is clear: your endpoint is not an existing url, in fact it’s not even a valid url. fox that and ot should work. On a sode note context.v3 is not the best thing to use to make a request. there are better options (like using fetch directly) described in the docs of the v4 api migration.

1 Like

@dorilama Thank you for your advice. URL is just an example to avoid my dev endpoint.
I success this post call using postman so the functionality of this end point is verified.
I assume that context.request call makes some issue.

I also tried the fetch method but is it possible to use in server-side action type too?
What I understand is, fetch and httprequest are available in client-side action type only.

However, I will check the document which you recommended.
Thank you

fetch is available in server side actions with the new v4 api because it uses an updated version of nodejs that supports fetch natively

1 Like