feat: テンプレートを追加

This commit is contained in:
2023-10-08 15:06:06 +09:00
parent 16462198f6
commit ca5779b35b
56 changed files with 2349 additions and 0 deletions
@@ -0,0 +1,19 @@
package {{configPackage}}
import feign.RequestInterceptor
import feign.RequestTemplate
class ApiKeyRequestInterceptor(
private val location: String,
private val name: String,
private val value: String,
) : RequestInterceptor {
override fun apply(requestTemplate: RequestTemplate) {
if (location == "header") {
requestTemplate.header(name, value)
} else if (location == "query") {
requestTemplate.query(name, value)
}
}
}