Submit an URI

Stay organized with collections Save and categorize content based on your preferences.

Create a Webrisk client and submit an URI.

Code sample


public static Submission submitUriExample(String uri) throws IOException {
  // create-webrisk-client
  try (WebRiskServiceClient webRiskServiceClient = WebRiskServiceClient.create()) {
    Submission submission = Submission.newBuilder().setUri(uri).build();
    CreateSubmissionRequest submissionRequest =
    Submission submissionResponse = webRiskServiceClient.createSubmission(submissionRequest);
    System.out.println("The submitted " + submissionResponse);
    return submissionResponse;

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.