[infinispan-issues] [JBoss JIRA] (ISPN-10748) Rest endpoint is not able to reach a preconfigured cache

Diego Lovison (Jira) issues at jboss.org
Tue Oct 8 12:18:00 EDT 2019


Diego Lovison created ISPN-10748:
------------------------------------

             Summary: Rest endpoint is not able to reach a preconfigured cache
                 Key: ISPN-10748
                 URL: https://issues.jboss.org/browse/ISPN-10748
             Project: Infinispan
          Issue Type: Bug
    Affects Versions: 10.0.0.CR3
            Reporter: Diego Lovison


infinispan.xml
{code:xml}
   <cache-container name="default">
      <transport cluster="${infinispan.cluster.name}" stack="${infinispan.cluster.stack:tcp}"/>
      <distributed-cache name="rest"/>
   </cache-container>
{code}


{code:java}
   public static void main(String[] args) throws IOException {
      String key = "k1";
      String value = "v1";
      OkHttpClient client = new OkHttpClient();

      String url = "http://%s:%s/rest/v2/caches/%s/%s";
      //String url = "http://%s:%s/rest/%s/%s";

      Request request = new Request.Builder()
            .url(String.format(url, "localhost", 11222, "rest", key))
            .put(RequestBody.create(TEXT_PLAIN, value))
            .build();
      Response response = client.newCall(request).execute();
      assertEquals(200, response.code());
   }
{code}

A few notes:
* When created via rest, it works.
* When using the v2 rest endpoint, it works.
* It is only failing with the legacy endpoint.




--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the infinispan-issues mailing list