You haven't provided much information so what follows is my best guess.
The error message you're seeing is an HTTP 405 response. The particular resource addressed in your URL does not support the POST method. If the server response is HTTP compliant, it should include an "Allow" header enumerating which methods are allowed (GET, PUT, or perhaps some custom methods).
If this guess-analysis is incorrect or you require more detailed help, provide more detailed info. For example, if this is a public url, provide that. Provide your actual curl command in its entirety. Provide the headers sent and received.