HttpRPCService

class HttpRPCService(var url: String, var httpClient: OkHttpClient) extends RPCService

HttpRPCService class

Companion
object
class Object
trait Matchable
class Any

Value members

Constructors

def this(url: String)

Constructor with URL parameter

Constructor with URL parameter

def this(httpClient: OkHttpClient)

constructor with an OkHttpClient paramater

constructor with an OkHttpClient paramater

Concrete methods

@throws(scala.throws.$lessinit$greater$default$1[com.casper.sdk.rpc.exceptions.RPCIOException])
def post(request: String): ResponseCodeAndBody

Execute the POST request

Execute the POST request

Returns

ResponseCodeAndBody

def send[T](request: RPCRequest)(implicit evidence$2: ClassTag[T]): RPCResult[T]

Perform non blocking calls

Perform non blocking calls

Type Params
T

: Casper result type item to be returned by the request

Value Params
request

: request to perform

Returns

:Deserialized JSON-RPC response

def sendAsync[T](request: RPCRequest)(implicit evidence$1: ClassTag[T]): Future[RPCResult[T]]

Perform asynchronous calls

Perform asynchronous calls

Type Params
T

: Casper result type item to be returned by the request

Value Params
request

: request to perform

Returns

Future that will be completed when a result is returned or if a request has failed

Concrete fields

var httpClient: OkHttpClient
var url: String