I changed the program as
public static void indexNode2() {
String uri = "http://localhost:7474/db/data/index/node/myindex";
String post = "{\"value\" : \"phoenix\",\"uri\" :
\"http://localhost:7474/db/data/node/1\",\"key\" : \"name\"}";
WebResource resource = Client.create().resource(uri);
ClientResponse response =
resource.accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON).entity(post).put(ClientResponse.class);
System.out.println("response" + response.getEntity(String.class));
System.out.println("status" + response.getStatus());
}
This should have worked on 1.5.M02 but it still returns 405 status
However, following command works on HTTP console with status 201 Created
POST /db/data/index/node/myindex
{"key":"name","value":"phoenix","uri":"http://localhost:7474/db/data/node/1"}
What is the problem???????????????
--
View this message in context:
http://neo4j-community-discussions.438527.n3.nabble.com/error-indexing-node-status-405-returned-tp3469788p3469959.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user