I am getting a 405 error trying to do a post reque...
# ask-stanley-ai
a
I am getting a 405 error trying to do a post request to an 'available without login' suitelet
c
AI generated answer (using internal Slack threads):
The 405 error you're encountering when trying to do a POST request to an 'available without login' Suitelet is likely due to the Suitelet not recognizing the source of the request. In some cases, users have encountered this error when using a posting tool. The Suitelet might be expecting the request to come from a browser. To resolve this, you can add a key/value pair to the HTTP Headers:
User-Agent : Mozilla/5.0
. This will make the Suitelet think that the request is coming from a browser and it should accept the anonymous request. Here is an example of how you can add this to your headers:
Copy code
code
headers: {
    'User-Agent': 'Mozilla/5.0'
}
Please note that this is a common solution to the 405 error, but there might be other factors at play depending on your specific situation. If this doesn't resolve your issue, you might need to check other aspects of your Suitelet configuration. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.882324278
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.861267149
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.858520567
Please provide your feedback on this answer.