redefine curl callback interface