package com.example.http import com.example.action.HttpMethod import com.example.action.NoString data class Request( var url:String, var method: HttpMethod = HttpMethod.Get, var headers:Map = emptyMap(), var body: ByteArray = byteArrayOf() ): NoString() { override fun equals(other: Any?): Boolean { if (this === other) return true if (other !is Request) return false if (url != other.url) return false if (method != other.method) return false if (headers != other.headers) return false if (!body.contentEquals(other.body)) return false return true } override fun hashCode(): Int { var result = url.hashCode() result = 31 * result + method.hashCode() result = 31 * result + headers.hashCode() result = 31 * result + body.hashCode() return result } }