[Front-end] Added an API factory that exclusively deals with post requests & response handling.