Chilkat Online Tools

Python / Shopify / Get a list of all countries

Back to Collection Items

import sys
import chilkat

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

http = chilkat.CkHttp()

http.SetRequestHeader("Content","<>")

sbResponseBody = chilkat.CkStringBuilder()
success = http.QuickGetSb("httpsDefaultParameterValue:DefaultParameterValue@DefaultParameterValue.myshopify.com/admin/countries.json",sbResponseBody)
if (success == False):
    print(http.lastErrorText())
    sys.exit()

print("Response status code = " + str(http.get_LastStatus()))
print(sbResponseBody.getAsString())

Curl Command

curl -X GET
	-H "Content: <>"
httpsDefaultParameterValue:DefaultParameterValue@DefaultParameterValue.myshopify.com/admin/countries.json

Postman Collection Item JSON

{
  "name": "Get a list of all countries",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Content",
        "value": "<>"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/admin/countries.json",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "admin",
        "countries.json"
      ]
    },
    "description": "Get a list of all countries."
  },
  "response": [
  ]
}