Add RequestType enumeration. Create functions for each type of body creation. if-else-else changed to switch-case