title: Azure Event Grid topic publish: A request was made to load the default HttpClient provider but one could not be found on the classpath
body: <p>I am trying to send azure cloud events from maven project to azure event grid topic, I'm getting below error when trying to send the message</p>
  <p>Error while sending the message to Event grid topic : A request was made to load the default HttpClient provider but one could not be found on the classpath. If you are using a dependency manager, consider including a dependency on azure-core-http-netty or azure-core-http-okhttp. Depending on your existing dependencies, you have the choice of Netty or OkHttp implementations. Additionally, refer to <a href="https://aka.ms/azsdk/java/docs/custom-httpclient" rel="nofollow noreferrer">https://aka.ms/azsdk/java/docs/custom-httpclient</a> to learn about writing your own implementation.</p>
  <p>Below are the dependencies I am using</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;dependency&gt;
          &lt;groupId&gt;com.azure&lt;/groupId&gt;
          &lt;artifactId&gt;azure-core&lt;/artifactId&gt;
          &lt;version&gt;1.15.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;com.azure&lt;/groupId&gt;
      &lt;artifactId&gt;azure-messaging-eventgrid&lt;/artifactId&gt;
      &lt;version&gt;4.1.0&lt;/version&gt;
  &lt;/dependency&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Below is the code I'm using to send to event grid topic</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>EventGridPublisherClient&lt;CloudEvent&gt; cloudEventClient = new EventGridPublisherClientBuilder()
                          .endpoint(eventGridTopic)
                          .credential(new AzureKeyCredential(eventGridKey))
                          .buildCloudEventPublisherClient();
                  cloudEventClient.sendEvent(new CloudEvent(AppConstants.SOURCE + env, AppConstants.MESSAGE_TYPE, BinaryData.fromObject(json), CloudEventDataFormat.JSON, MediaType.APPLICATION_JSON));</code></pre>
  </div>
  </div>
  </p>