Is HTTP request method case sensitive?

Hi There, I would appreciate if anyone could help me.

I am trying to create an HTTP function to process POST request coming from an external HTTP client. Firstly I created a backend .jsw file to simulate the client. A request called DM001 was created with HTTP method defined like this:

const requestoptions = {
    "method": "post",
    "headers": {
        "Content-Type": "application/json",
    },
    "body": JSON.stringify(requestbody),
}

Then I created post_DM001() in http-functions.js to process the request. After all were set up, I fired a request from my ‘simulator’ and it worked just fine. Later, the developer of the HTTP client application told me he got an 404 error when sending a POST request to my backend function. I checked the log and found this message:

Error loading function from web module backend/http-functions.js: function 'use_DM001' not found

It looks like Wix didn’t recognize the POST request from the client application and tried to convert it to a USE request. Then I changed post_DM001() to use_DM001(). Although the error was gone, but it didn’t work out because just like GET method, I could not retrieve request body from USE request (another issue I wouldn’t talk about here). After spending quite some time but getting nothing, I changed the “post” method in my simulator to upper case “POST”, and sent a POST request to my post_DM001(), the same error was thrown:

const requestoptions = {
    "method": "POST",
......
}

I told the developer of client application about my findings and he said request method is case sensitive and should be in upper case according to HTTP standards, and it seems the development kit he’s using complies to standards to send request method in upper case, and there is no way for him to change that from the kit. I looked through posts from Internet and also confirmed request method should be in upper case. So it is hard for me to ask him to do something.

So my question is, is it true that Wix only accepts HTTP request method in lower case, or it’s because I did something wrong with my code? What I can do to deal with the situation?

Thanks.

I would recommend verifying all parts of the endpoint configuration, testing with various client tools like postman, and reaching out to Wix support if the issue persists, as they may be able to clarify any current limitations or issues with their platform.