Skip to content

Commit 7ab3bf4

Browse files
committed
1 parent adc3114 commit 7ab3bf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/com/github/mgramin/sqlboot/sql/select/wrappers/RestSelectQuery.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import com.github.mgramin.sqlboot.sql.select.SelectQuery
44
import com.google.gson.Gson
55
import com.google.gson.reflect.TypeToken
66
import org.springframework.http.MediaType
7+
import org.springframework.web.reactive.function.BodyInserters
78
import org.springframework.web.reactive.function.client.WebClient
89
import reactor.core.publisher.Flux
910
import reactor.core.publisher.toFlux
@@ -23,8 +24,9 @@ class RestSelectQuery(
2324
override fun execute(variables: Map<String, Any>): Flux<Map<String, Any>> {
2425
val client: List<Map<String, Any>>? = WebClient
2526
.create(endpoint)
26-
.get()
27+
.post()
2728
.uri("/exec?query=${origin.query()}".replace("{", "[").replace("}", "]"))
29+
.body(BodyInserters.fromObject(origin.query()))
2830
.accept(MediaType.APPLICATION_JSON)
2931
.retrieve()
3032
.bodyToMono(String::class.java)

0 commit comments

Comments
 (0)