post method with json using gson implemented.