ribesg
04/12/2019, 2:36 PM.build() on a HttpRequestBuilder to get the attributes already set on that buildere5l
04/12/2019, 2:47 PMribesg
04/12/2019, 3:11 PMuseAuthentication() on HttpRequestBuilder which is used on the endpoint implementations that require authentication in MS libs. This extensions function just adds an attribute to the request, so that the authentication feature interceptor knows if it needs to add the authentication header (among other things).ribesg
04/12/2019, 3:13 PMHttpRequestBuilder to check if useAuthentication has been called, and it would be nice if it did less work.
internal fun HttpRequestBuilder.isUseAuthentication(): Boolean =
build().attributes.getOrNull(requiresAuth) ?: falseribesg
04/15/2019, 12:05 PM.build() mutliple times it seems...ribesg
04/15/2019, 12:06 PM@Suppress("KDocMissingDocumentation")
class HeadersBuilder(size: Int = 8) : StringValuesBuilder(true, size) {
override fun build(): Headers {
require(!built) { "HeadersBuilder can only build a single Headers instance" }
built = true
return HeadersImpl(values)
}
}ribesg
04/15/2019, 12:07 PMribesg
04/15/2019, 12:11 PMe5l
04/15/2019, 12:13 PMattributes available in 1.2.0 could you file an issue?ribesg
04/15/2019, 12:13 PMHttpRequestBuilder. I’ll open an issue for thatribesg
04/15/2019, 12:19 PMribesg
04/15/2019, 12:32 PMsetAttributes is a function to remove the builder from my toplevel map when it’s called 🧞♂️ribesg
04/15/2019, 12:35 PM