AlienVault-OTX / OTX-Python-SDK

The Python SDK for AlienVault OTX
Other
359 stars 162 forks source link

Urlencode indicator in the URL #36

Open bieron opened 7 years ago

bieron commented 7 years ago

Server returns HTTP 400 when queried for details on URL-unsafe indicators, especially of type IndicatorType.URL. The encoding should be the responsibility of the API, because 1) the actual implementation of query is encapsulated in its methods, users don't even know it is sent in URL 2) for consistency, API should be able to handle the same format (URL-unsafe that is) of IoCs that it returns, without any need for processing by the user

I'm sorry I didn't write any test for it, can't make the test to work, tried substituting X_OTX_DEV_SERVER=https://otx.alienvault.com/ to no avail.