Forked from ultimatemember/gist:44d89249baf9f73b89d6
Last active
August 29, 2015 14:24
-
-
Save CoachBirgit/39b9fed9838a0da143ad 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
// API Request | |
$url = 'http://localhost/um-api/get.user/?id=1'; | |
// Include your public key and token to the URL | |
$url = add_query_arg('key', '75d9a913782eee3d990e4464ce26213e', $url ); | |
$url = add_query_arg('token', 'bae6ee38cf02a50a0ac8259eed34ceb9', $url ); | |
// Process your request | |
$request = wp_remote_get( $url ); | |
$response = json_decode( wp_remote_retrieve_body( $request ) , true ); | |
// That's it, now you can use/print the returned response | |
print_r( $response ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment