New method setContent that add an entity in the post method.