Created
January 4, 2022 19:54
-
-
Save HawaiiRyan/4396572e8e76dc02c70e1c5c4b7dafe0 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
package com.vmware; | |
import okhttp3.OkHttpClient; | |
import okhttp3.Request; | |
import okhttp3.Response; | |
import java.io.IOException; | |
public class restexample { | |
public static void main(String[] args) { | |
OkHttpClient client = new OkHttpClient().newBuilder() | |
.build(); | |
Request request = new Request.Builder() | |
.url("https://ws1.ryanpringnitz.com/API/mdm/devices/search") | |
.method("GET", null) | |
.addHeader("aw-tenant-code", "a/APIKEYEXAMPLE/=") | |
.addHeader("Content-Type", "application/json") | |
.addHeader("Authorization", "Basic BASICHEADERAUTHEXAMPLE=") | |
.build(); | |
Response response = null; | |
try { | |
response = client.newCall(request).execute(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
System.out.println("Workspace ONE UEM REST API Response: " + response); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment