Skip to content

Commit

Permalink
URLEncoder igjen #deploy-tenor-search-service
Browse files Browse the repository at this point in the history
  • Loading branch information
krharum committed Jan 11, 2024
1 parent cbd87f7 commit 65d1bda
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import no.nav.testnav.libs.reactivecore.utils.WebClientFilter;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
import reactor.util.retry.Retry;
Expand All @@ -30,10 +29,9 @@ public Mono<TenorResponse> call() {

return webClient.get()
.uri(uriBuilder -> uriBuilder.path(TENOR_QUERY_URL)
.queryParam("kql", query)
.queryParam("kql", URLEncoder.encode(query, StandardCharsets.UTF_8))
.queryParam("nokkelinformasjon", true)
.build())
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
.retrieve()
.bodyToMono(JsonNode.class)
Expand Down

0 comments on commit 65d1bda

Please sign in to comment.