-
-
Save polatengin/2702dc075e2add7ff2d30fbd50fd7e16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows 10 UWP uygulaması içerisinde domain name uygunluk (availability) sorgulama |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page | |
x:Class="DomainAvailabilityChecker.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:DomainAvailabilityChecker"> | |
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | |
<StackPanel Margin="30"> | |
<TextBox HorizontalAlignment="Stretch" Margin="10" x:Name="txtDomainName" /> | |
<Button Content="Getir" Margin="10" Click="Button_Click" /> | |
<TextBlock x:Name="lblResult" Margin="10" /> | |
</StackPanel> | |
</Grid> | |
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async void Button_Click(object sender, RoutedEventArgs e) | |
{ | |
var domainName = txtDomainName.Text; | |
var client = new HttpClient(); | |
var json = await client.GetStringAsync("http://api.freedomainapi.com/?r=taken&apikey={YOUR-API-KEY}&domain=" + domainName); | |
var result = JsonConvert.DeserializeObject<JObject>(json)["taken"].Value<int>(); | |
lblResult.Text = "Bu domain müsait" + (result == 1 ? " değil!" : "!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment