No issue with the code.
Earlier failure was because of lesser payload length.