Fix sendevent command

1) Send event also when body is None 
2) add automatically content-length header when body is passed