RequestFactory.java 248 B

1234567891011121314
  1. package com.fuzamei.http;
  2. public class RequestFactory {
  3. public static Request createRequest(String url){
  4. if(("https").equals(url.substring(0,5))){
  5. return new HttpsRequest();
  6. }else{
  7. return new HttpRequest();
  8. }
  9. }
  10. }