3 Replies Latest reply on Mar 7, 2019 10:01 AM by dbb-Oracle

    Wrong Content Type When Connecting to PGX HTTP Server

    Tim.Hall

      Hi,

       

      We are connecting to PGX HTTP server in a Java program. We are running version 2.7.1 and the DB backend is Hbase.

       

      The code snippet is as below:

      ServerInstance instance = Pgx.getInstance("http://localhost:7007");

      PgxSession g = instance.createSession("my_session");

      PgxGraph pgraph = g.getGraph(my_graph);

       

      However, the getGraph() method returned the following error:

      "Wrong content type: text/html. Expected: application/json"

       

      Please help. How to set the content type as JSON in the Java program?. The intention here is to be able to connect to the PGX HTTP server and submit PQGL for querying.

       

      Thanks.