Replace class StringPostRequest with method createPostRequest