added purgeChannels for further testing,
send cannot read nested json headers correctly.