All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ecwid.apiclient.v3.httptransport.HttpRequest.kt Maven / Gradle / Ivy

package com.ecwid.apiclient.v3.httptransport

sealed class HttpRequest(
	val method: String,
	open val uri: String,
	open val params: Map,
	open val transportHttpBody: TransportHttpBody,
	open val headers: Map,
) {
	data class HttpGetRequest(
		override val uri: String,
		override val params: Map,
		override val headers: Map
	) : HttpRequest("GET", uri, params, TransportHttpBody.EmptyBody, headers)

	data class HttpPostRequest(
		override val uri: String,
		override val params: Map,
		override val transportHttpBody: TransportHttpBody,
		override val headers: Map
	) : HttpRequest("POST", uri, params, transportHttpBody, headers)

	data class HttpPutRequest(
		override val uri: String,
		override val params: Map,
		override val transportHttpBody: TransportHttpBody,
		override val headers: Map
	) : HttpRequest("PUT", uri, params, transportHttpBody, headers)

	data class HttpDeleteRequest(
		override val uri: String,
		override val params: Map,
		override val headers: Map
	) : HttpRequest("DELETE", uri, params, TransportHttpBody.EmptyBody, headers)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy