-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error - HTTP verb used to access this page is not allowed #8
Comments
Hello! Which version of PyNamecheap are you using? Please provide a commit hash. It's possible that issue is about replacing URI params with POST data when large (>10) amount of items is present. |
How many domains is "large volume?". I think the API is not intended to be used as a bulk checking tool. |
agrrh: Bemmu: |
@michaeos |
I am getting the same error, when invoking namecheap.domains.getInfo for a single domain (via a subclass that I have to perform that method). So this is definitely not related to request size, but (I would guess) a sporadic error thrown by the API endpoint. Would you like PyNamecheap to automatically retry when this error happens, or should the application do the retry? If you would like the application to perform the retry, then I suggest throwing a better exception. Here is partial traceback, for when the error is thrown:
The KeyError should probably be replaced by ApiError() or some other specific exception, to make it easier for the app to detect and retry. |
Oh, the point to my prior comment: provide a direction, and I'll supply a patch. |
@gstein Would you agree that Here's quick and untested patch to do so, just in case you don't want to spend time: #14 Still looking forward to see your version which I suppose would be better. |
Well ... I could see passing those two values into the Api object (along with suitable parameter defaults), and have it perform retrying internally. Otherwise, I would switch my Api usage code from: I think that I'd prefer of the Api object retried, to keep app code cleaner. But it's your code :-) ... I'll supply either style of patch. |
Periodically I get the following error response when checking domain availability. When I retry with the same domain it is usually successful. This is being run inside a script that executes a large volume of domain check requests sequentially.
--- Request ---
<title>405 - HTTP verb used to access this page is not allowed.</title> <style type="text/css"> </style>https://api.namecheap.com/xml.response?UserName=xxxxxx&ApiKey=xxxxxxxxxxx&DomainList=example.com&ApiUser=xxxxxx&Command=namecheap.domain s.check&ClientIP=11.11.11.11
{}
--- Response ---
Server Error
405 - HTTP verb used to access this page is not allowed.
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
The text was updated successfully, but these errors were encountered: