class OutgoingRequestBuilder : BaseOutgoingMessageBuilder<OutgoingRequest>
Concrete class of MessageBuilder for building OutgoingRequest
OutgoingRequestBuilder(path: String, method: Method)
Concrete class of MessageBuilder for building OutgoingRequest |
val method: Method
The CoAP Method to use for this request (GET/PUT/POST/DELETE) |
|
val path: String
The path to send this request to. (e.g. /foo/bar) |
fun ackTimeout(value: Int): OutgoingRequestBuilder
Config the timeout after which a resend will happen, in milliseconds. When set to 0, to use a default value according to the CoAP specification and the endpoint. |
|
fun build(): OutgoingRequest
Build Coap Message |
|
fun expectSuccess(expect: Boolean): OutgoingRequestBuilder
Tweaks Observable behavior and allows for custom error handling.
If true, a non-2.xx response will error the response() Observable.
If false (default), a non-2.xx response will be reported as a |
|
fun forceNonBlockwise(value: Boolean): OutgoingRequestBuilder
Flag to treat the request as non-blockwise. In a blockwise request data is sent in chuncks(blocks) of fixed size. In GG we use 1024 bytes. On the tracker some Coap resources accept larger data payloads in a single block. In this case we need to force a non-blockwise request. |
|
fun maxResendCount(value: Int): OutgoingRequestBuilder
Config the maximum number of times the client will resend the request if there is a response timeout. When set to 0, a request will only be sent once and not re-sent. When set to a negative number(e.g. -1), the max resend count will set to GG_COAP_DEFAULT_MAX_RETRANSMIT from GG XP lib |
open fun body(data: Data): OutgoingMessageBuilder<T> open fun body(stream: InputStream): OutgoingMessageBuilder<T>
Body of the coap message |
|
open fun option(option: Option): OutgoingMessageBuilder<T>
Add an option to coap message |
|
open fun progressObserver(progressObserver: Observer<Int>): OutgoingMessageBuilder<T>
Progress Observer of the coap message |