Package io.kvision.rest

RESTful API client with support for type-safe connectivity.

Types

BadGateway
Link copied to clipboard
js
class BadGateway(url: String, method: HttpMethod, message: String) : RemoteRequestException
BadRequest
Link copied to clipboard
js
class BadRequest(url: String, method: HttpMethod, message: String) : RemoteRequestException
Forbidden
Link copied to clipboard
js
class Forbidden(url: String, method: HttpMethod, message: String) : RemoteRequestException
HttpMethod
Link copied to clipboard
js
enum HttpMethod : Enum<HttpMethod>
NotAllowed
Link copied to clipboard
js
class NotAllowed(url: String, method: HttpMethod, message: String) : RemoteRequestException
NotFound
Link copied to clipboard
js
class NotFound(url: String, method: HttpMethod, message: String) : RemoteRequestException
NotImplemented
Link copied to clipboard
js
class NotImplemented(url: String, method: HttpMethod, message: String) : RemoteRequestException
RemoteRequestException
Link copied to clipboard
js
open class RemoteRequestException(code: Short, url: String, method: HttpMethod, message: String) : Throwable
Response
Link copied to clipboard
js
data class Response<T>(data: T, textStatus: String, jqXHR: <ERROR CLASS>)
A response wrapper
RestClient
Link copied to clipboard
js
open class RestClient(module: <ERROR CLASS>?)
An agent responsible for remote calls.
ServerError
Link copied to clipboard
js
class ServerError(url: String, method: HttpMethod, message: String) : RemoteRequestException
ServiceUnavailable
Link copied to clipboard
js
class ServiceUnavailable(url: String, method: HttpMethod, message: String) : RemoteRequestException
Unauthorized
Link copied to clipboard
js
class Unauthorized(url: String, method: HttpMethod, message: String) : RemoteRequestException
XHRError
Link copied to clipboard
js
class XHRError(url: String, method: HttpMethod, message: String) : RemoteRequestException
Code 0 does not represent any http status, it represent XHR error (e.g.

Properties

HTTP_BAD_GATEWAY
Link copied to clipboard
js
const val HTTP_BAD_GATEWAY: Short = 502
HTTP_BAD_REQUEST
Link copied to clipboard
js
const val HTTP_BAD_REQUEST: Short = 400
HTTP_FORBIDDEN
Link copied to clipboard
js
const val HTTP_FORBIDDEN: Short = 403
HTTP_NOT_ALLOWED
Link copied to clipboard
js
const val HTTP_NOT_ALLOWED: Short = 405
HTTP_NOT_FOUND
Link copied to clipboard
js
const val HTTP_NOT_FOUND: Short = 404
HTTP_NOT_IMPLEMENTED
Link copied to clipboard
js
const val HTTP_NOT_IMPLEMENTED: Short = 501
HTTP_SERVER_ERROR
Link copied to clipboard
js
const val HTTP_SERVER_ERROR: Short = 500
HTTP_SERVICE_UNAVAILABLE
Link copied to clipboard
js
const val HTTP_SERVICE_UNAVAILABLE: Short = 503
HTTP_UNAUTHORIZED
Link copied to clipboard
js
const val HTTP_UNAUTHORIZED: Short = 401
XHR_ERROR
Link copied to clipboard
js
const val XHR_ERROR: Short = 0