theelous3 / asks

Async requests-like httplib for python.
MIT License
508 stars 63 forks source link

possible malforming of initial leading forward slash in ip:port formed uris #106

Open theelous3 opened 5 years ago

theelous3 commented 5 years ago
@api_call
async def customer_count(s, auth_token):
    params = {
        "limit": 1,
        "access_token": auth_token
    }

    return await worker(s, _LOC_DEV + "/v1/customers", params=params)

@api_call
async def user_count(s, auth_token):
    params = {
        "limit": 1,
        "access_token": auth_token
    }

    return await worker(s, _LOC_LOCAL + "v1/users/count", params=params)

where dev is'http://iwebsvcs.dev.blueface.com/web_api/' and local is 'http://0.0.0.0:7000/'