Class ServerContext

java.lang.Object
com.intuit.karate.http.ServerContext
All Implemented Interfaces:
org.graalvm.polyglot.proxy.Proxy, org.graalvm.polyglot.proxy.ProxyObject

public class ServerContext extends Object implements org.graalvm.polyglot.proxy.ProxyObject
Author:
pthomas3
  • Constructor Details

  • Method Details

    • setApiIfPathStartsWith

      public boolean setApiIfPathStartsWith(String prefix)
    • getSessionCookieValue

      public String getSessionCookieValue()
    • readAsString

      public String readAsString(String resource)
    • read

      public Object read(String resource)
    • eval

      public Object eval(String source)
    • evalWith

      public Object evalWith(Object o, String source)
    • toJson

      public String toJson(Object o)
    • toJs

      public Object toJs(Object o)
    • toJsonPretty

      public String toJsonPretty(Object o)
    • getConfig

      public ServerConfig getConfig()
    • getRequest

      public Request getRequest()
    • getVariables

      public Map<String,Object> getVariables()
    • isNewSession

      public boolean isNewSession()
    • init

      public void init()
    • getSession

      public Session getSession()
    • setSession

      public void setSession(Session session)
    • isLockNeeded

      public boolean isLockNeeded()
    • setLockNeeded

      public void setLockNeeded(boolean lockNeeded)
    • isStateless

      public boolean isStateless()
    • setStateless

      public void setStateless(boolean stateless)
    • isAjax

      public boolean isAjax()
    • isApi

      public boolean isApi()
    • setApi

      public void setApi(boolean api)
    • isClosed

      public boolean isClosed()
    • isHttpGetAllowed

      public boolean isHttpGetAllowed()
    • setHttpGetAllowed

      public void setHttpGetAllowed(boolean httpGetAllowed)
    • setRequestValidator

      public void setRequestValidator(Function<ServerContext,Boolean> requestValidator)
    • getRequestValidator

      public Function<ServerContext,Boolean> getRequestValidator()
    • isSwitched

      public boolean isSwitched()
    • getRedirectPath

      public String getRedirectPath()
    • getBodyAppends

      public List<String> getBodyAppends()
    • bodyAppend

      public void bodyAppend(String body)
    • log

      public void log(Object... args)
    • getMember

      public Object getMember(String key)
      Specified by:
      getMember in interface org.graalvm.polyglot.proxy.ProxyObject
    • getMemberKeys

      public Object getMemberKeys()
      Specified by:
      getMemberKeys in interface org.graalvm.polyglot.proxy.ProxyObject
    • hasMember

      public boolean hasMember(String key)
      Specified by:
      hasMember in interface org.graalvm.polyglot.proxy.ProxyObject
    • putMember

      public void putMember(String key, org.graalvm.polyglot.Value value)
      Specified by:
      putMember in interface org.graalvm.polyglot.proxy.ProxyObject