title: Retrofit Response{protocol=h2, code=404, message=, url=https://myurl/api/}
body: <p>i am sending the request using retrofit2 but in response i am getting the following error</p>
  
  <blockquote>
    <p>Response{protocol=h2, code=404, message=, url=<a href="https://myurl/api/" rel="nofollow noreferrer">https://myurl/api/</a>}</p>
  </blockquote>
  
  <p>here i am passing my base url to request</p>
  
  <blockquote>
    <p>static final String BASE_URL = "<a href="https://myurl/" rel="nofollow noreferrer">https://myurl/</a>";</p>
  </blockquote>
  
  <p>here is my controller class.</p>
  
  <pre><code>private static Retrofit retrofit;
  
  public static Retrofit getClient() {
      if (retrofit == null) {
          retrofit = new Retrofit.Builder()
                  .baseUrl(BASE_URL)
                  .addConverterFactory(GsonConverterFactory.create())
                  .build();
      }
      return retrofit;
  }
  </code></pre>
  
  <p>here is my interface.
  here i am passing the body with parameters and header using map</p>
  
  <pre><code>public interface AddProductApi {
  
      @FormUrlEncoded
      @POST("api/")
      Call&lt;BodyOfAddPro&gt; loadChanges(@FieldMap Map&lt;String,String&gt; body, 
  @HeaderMap Map&lt;String, String&gt; header);
  }
  </code></pre>
  
  <p>here is my api call function
  here i am passing the parameters to get response. and i am getting the error response which i had shown above.</p>
  
  <pre><code>private void retroApiCall() {
  
      addProductApi = Controller.getClient().create(AddProductApi.class);
  
  Map&lt;String, String&gt; addproductParams = new HashMap&lt;String,String&gt;();
  addproductParams.put("UserID", sharedpreferences.getString("UserID", 
  ""));
      addproductParams.put("CategoryID", subsubCategoryID);
  
     addproductParams.put("ProductPrice",productPrice.getText().toString());
     addproductParams.put("DeliveryTime",Time.getText().toString();
     addproductParams.put("ProductType",itemCondition.getText().toString());
     addproductParams.put("OutOfStock", outofStock);
     addproductParams.put("IsActive", "1");
  
  
      Log.e("body",addproductParams.toString());
  
      Map&lt;String, String&gt; header = new HashMap&lt;&gt;();
      header.put("Verifytoken", sharedpreferences.getString("ApiToken",""));
  
      Log.e("header", header.toString());
  
      Call&lt;BodyOfAddPro&gt;call1
      =addProductApi.loadChanges(addproductParams,header);
      call1.enqueue(new Callback&lt;BodyOfAddPro&gt;() {
          @Override
          public void onResponse(Call&lt;BodyOfAddPro&gt; call, 
  retrofit2.Response&lt;BodyOfAddPro&gt; response) {
              BodyOfAddPro loginResponse = response.body();
  
              Log.e("retroresponse", "Response 1 --&gt; " + response);
  
          }
  
          @Override
          public void onFailure(Call&lt;BodyOfAddPro&gt; call, Throwable t) {
              Log.e("retroresponseerror", "Response 1 --&gt; " + 
  t.getMessage());
  
     }
      });
  
  }
  </code></pre>
  
  <p>looking for the answer.!</p>