Base Environment Builder
class BaseEnvironmentBuilder(builder: CollectionBuilder, workspace: Workspace) : IResourceBuilder<BaseEnvironment>
Content copied to clipboard
BaseEnvironment resource builder
Samples
import com.yamilovs.insomnia.exporter.model.*
import com.yamilovs.insomnia.exporter.model.Collection
import com.yamilovs.insomnia.exporter.model.request.FollowRedirect
import com.yamilovs.insomnia.exporter.model.request.Method
import com.yamilovs.insomnia.exporter.model.request.authentication.EmptyAuthentication
import com.yamilovs.insomnia.exporter.model.request.body.EmptyBody
import com.yamilovs.insomnia.exporter.model.request.header.Header
import com.yamilovs.insomnia.exporter.model.request.parameter.Parameter
import java.net.URL
fun main() {
//sampleStart
val collectionBuilder = CollectionBuilder()
val workspace = Workspace()
BaseEnvironment.build(collectionBuilder, workspace) {
env("BASE_URL", "https://yamilovs.com") // added first env value
env { "USERNAME" to "yamilovs" } // added second env value
+("PASSWORD" to "qwerty") // added third env value
// added nested environment
environment {
// Environment resource DSL is available here
}
}
//sampleEnd
}
Constructors
Link copied to clipboard
fun BaseEnvironmentBuilder(builder: CollectionBuilder, workspace: Workspace)
Content copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun environment(configure: EnvironmentBuilder.() -> Unit = {}): BaseEnvironmentBuilder
Content copied to clipboard