Skip to content

Commit

Permalink
refactor: don't initialise property list for each request proxy.
Browse files Browse the repository at this point in the history
  • Loading branch information
outofcoffee committed May 13, 2024
1 parent 0e7f3d8 commit c3b1e63
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,20 @@ val objectProxyRequestBuilder : ScriptRequestBuilder = { request ->
class RequestProxy(
request: HttpRequest
) : SimpleScriptRequest(request), ProxyObject {
private val properties = arrayOf(
"path",
"method",
"uri",
"headers",
"pathParams",
"queryParams",
"formParams",
"body",
"normalisedHeaders",
)

companion object {
private val properties = arrayOf(
"path",
"method",
"uri",
"headers",
"pathParams",
"queryParams",
"formParams",
"body",
"normalisedHeaders",
)
}

override fun getMember(key: String?): Any? = when (key) {
"path" -> path
Expand Down

0 comments on commit c3b1e63

Please sign in to comment.