import java.net.HttpURLConnection import java.net.URL import java.util.Scanner fun main() { val url = URL("https://shabanic.ir/api/v1/ibanOwnerVerification?nid=0829940049&iban=IR880190000000334341732005") val connection = url.openConnection() as HttpURLConnection connection.requestMethod = "POST" connection.setRequestProperty( "SHABANIC-API-KEY", "1APojvIEsJvIvzoy7JgrFGj75xRKhwCsxauNhNbWknMJtAN7jPFNtGWpMKPKXm2HeB1cWUCmAgZBGyZ3diOIx3E36QAIzct62enVvaw5iZZupC7qS0p0DlKBHXIJQjtDbTUdTOzYsW8HXbVcsyioGG" ) connection.doOutput = true val scanner = Scanner(connection.inputStream) while (scanner.hasNextLine()) { println(scanner.nextLine()) } scanner.close() }