Skip to content

Commit

Permalink
Fix request headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkosrc committed Sep 24, 2023
1 parent 4634f97 commit 2f9b9e6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class GandiClient @Autowired constructor(var restTemplate: RestTemplate) {

fun doUpdateIpWithfqdn(ipAddress: String, fqdn: String): ResponseEntity<String> {
val httpHeaders = HttpHeaders()
val requestEntity = HttpEntity(
MyRequestBody("300", listOf(ipAddress)), HttpHeaders().apply { httpHeaders["Authorization"] = "Apikey $apiKey" })
httpHeaders.set("Authorization", "Apikey $apiKey")
val requestEntity = HttpEntity(MyRequestBody("300", listOf(ipAddress)), httpHeaders)
return try {
val responseEntity = restTemplate.exchange(
"$dnsApiUrl$fqdn/A",
Expand Down

0 comments on commit 2f9b9e6

Please sign in to comment.