use HttpRequest.getString for get; remove ternary operator