I think he was rude on several counts.
Rude to even try.
Rude in his delivery/request.
It might be one thing if the kid lived right next door to you and you have a relationship with him that has ever involved you treating him. And if maybe you were, oh, unloading groceries, and he said, "Hi, Mrs. BeagleMommy!" And exchange a pleasantry, and you said something about trick-or-treating. And then if he'd said, sort of hopefully, "Do you have any leftover candy?" It might be kinda cute, inside the right relationship.
But I have sort of a relationship like that w/ our bldg superintendent's cute kids, and I'd be a bit taken aback if they brought it up out of the blue.