Created
July 31, 2012 19:21
-
-
Save leblanc-simon/3219713 to your computer and use it in GitHub Desktop.
HTTP status return with prestapyt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from prestapyt import PrestaShopWebServiceError, PrestaShopWebService, PrestaShopWebServiceDict | |
prestashop = PrestaShopWebServiceDict('http://localhost/api', '098F6BCD4621D373CADE4E832627B4F6') | |
prestashop.search('addresses') # 401 + 200 : OK, it's the first call | |
prestashop.get('addresses', 4) # 200 only: OK | |
prestashop.get('addresses', 6) # 200 only: OK | |
prestashop.search('orders') # 401 + 200 : NOK, it must be only 200 | |
prestashop.get('orders', 2) # 200 only: OK | |
prestashop.get('orders', 5) # 200 only: OK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment