def paging_args_to_params(page_size, page_number):
    """
    Returns the parameters to the HTTP request when using paging.
    """
    try:
        page_size = int(page_size)
        page_number = int(page_number)
    except ValueError:
        raise ValueError("page_number and page_size should be numbers")

    params = {'page[size]': page_size, 'page[number]': page_number}
    return params