Last active
March 14, 2020 14:53
-
-
Save yasaryousuf/5ec7b7d33bccafd1718c557b5eb9953d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
$args = [ | |
'headers' => [ | |
'X-Api-Key' => 'Ek7o0F5OX29MzDjQYuDzy9FimBEOKwuukixRryN4' | |
] | |
]; | |
$response = wp_remote_get( "https://sandbox.postcodeapi.nu/v3/lookup/6545CA/29", $args); | |
if ( is_array( $response ) && ! is_wp_error( $response ) ) { | |
$body = $response['body']; # RESPONSE FROM API | |
var_dump($body); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment