Class ServiceConnection

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.URL getServer()  
      java.lang.String sendGetRequest​(java.lang.String endpoint, java.util.Map<java.lang.String,​?> params)  
      java.util.Map<java.lang.String,​java.lang.Object> sendJson​(java.lang.String endpoint, java.util.Map<java.lang.String,​?> object)  
      java.lang.String sendPostRequest​(java.lang.String endpoint, java.util.Map<java.lang.String,​?> params, com.google.common.net.MediaType contentType, byte[] payload)  
      ServiceConnection withService​(Action.Service service)
      Returns a copy of this connection that talks to a different service.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sendPostRequest

        public java.lang.String sendPostRequest​(java.lang.String endpoint,
                                                java.util.Map<java.lang.String,​?> params,
                                                com.google.common.net.MediaType contentType,
                                                byte[] payload)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • sendGetRequest

        public java.lang.String sendGetRequest​(java.lang.String endpoint,
                                               java.util.Map<java.lang.String,​?> params)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • sendJson

        public java.util.Map<java.lang.String,​java.lang.Object> sendJson​(java.lang.String endpoint,
                                                                               java.util.Map<java.lang.String,​?> object)
                                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getServer

        public java.net.URL getServer()