forked from sendgrid/sendgrid-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeleteAccessSettings.java
More file actions
30 lines (25 loc) · 877 Bytes
/
DeleteAccessSettings.java
File metadata and controls
30 lines (25 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import com.sendgrid.Method;
import com.sendgrid.Request;
import com.sendgrid.Response;
import com.sendgrid.SendGrid;
import java.io.IOException;
/* Remove one or more IPs from the whitelist
DELETE /access_settings/whitelist
*/
public class DeleteAccessSettings extends Example {
private void run() throws IOException {
try {
String endPoint = "access_settings/whitelist";
String body = "{\"ids\":[1,2,3]}";
Request request = createRequest(Method.DELETE, endPoint, body);
Response response = execute(request);
printResponseInfo(response);
} catch (IOException ex) {
throw ex;
}
}
public static void main(String[] args) throws IOException {
DeleteAccessSettings deleteAccessSettings = new DeleteAccessSettings();
deleteAccessSettings.run();
}
}