static public HTTPMethod Options(HTTPSession session) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Options, session, null); }
static public HTTPMethod Post(HTTPSession session) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Post, session, null); }
static public HTTPMethod Post(String legalurl) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Post, legalurl); }
static public HTTPMethod Get(HTTPSession session, String legalurl) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Get, session, legalurl); }
static public HTTPMethod Head(HTTPSession session, String legalurl) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Head, session, legalurl); }
static public HTTPMethod Put(HTTPSession session, String legalurl) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Put, session, legalurl); }
static public HTTPMethod Get(HTTPSession session) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Get, session, null); }
static public HTTPMethod Put(HTTPSession session) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Put, session, null); }
static public HTTPMethod Options(HTTPSession session, String legalurl) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Options, session, legalurl); }
static public HTTPMethod Options(String legalurl) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Options, legalurl); }
static public HTTPMethod Head(HTTPSession session) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Head, session, null); }
static public HTTPMethod Post(HTTPSession session, String legalurl) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Post, session, legalurl); }
static public HTTPMethod Get(String legalurl) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Get, legalurl); }
static public HTTPMethod Head(String legalurl) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Head, legalurl); }
static public HTTPMethod Put(String legalurl) throws HTTPException { return new HTTPMethod(HTTPSession.Methods.Put, legalurl); }
/** * Common method creation code so we can isolate mocking * * @param session * @return * @throws HTTPException */ static protected HTTPMethod makemethod(HTTPSession.Methods m, HTTPSession session, String url) throws HTTPException { HTTPMethod meth = null; if(MOCKMETHODCLASS == null) { // do the normal case meth = new HTTPMethod(m, session, url); } else {//(MOCKMETHODCLASS != null) java.lang.Class methodcl = MOCKMETHODCLASS; Constructor<HTTPMethod> cons = null; try { cons = methodcl.getConstructor(HTTPSession.Methods.class, HTTPSession.class, String.class); } catch (Exception e) { throw new HTTPException("HTTPFactory: no proper HTTPMethod constructor available", e); } try { meth = cons.newInstance(m, session, url); } catch (Exception e) { throw new HTTPException("HTTPFactory: HTTPMethod constructor failed", e); } } return meth; }