Class ElasticConnexion
- java.lang.Object
-
- fr.paris.lutece.plugins.libraryelastic.util.ElasticConnexion
-
public final class ElasticConnexion extends Object
The Class ElasticConnexion.
-
-
Constructor Summary
Constructors Constructor Description ElasticConnexion()ConstructorElasticConnexion(String strLogin, String strPassword)Basic Authentification constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringDELETE(String strURI)Send a DELETE request to Elastic Search serverStringGET(String strURI)Send a GET request to Elastic Search serverStringPOST(String strURI, String strJSON)Send a POST request to Elastic Search serverStringPUT(String strURI, String strJSON)Send a PUT request to Elastic Search server
-
-
-
Method Detail
-
GET
public String GET(String strURI) throws fr.paris.lutece.util.httpaccess.HttpAccessException
Send a GET request to Elastic Search server- Parameters:
strURI- The URI- Returns:
- The response
- Throws:
fr.paris.lutece.util.httpaccess.HttpAccessException
-
PUT
public String PUT(String strURI, String strJSON) throws fr.paris.lutece.util.httpaccess.HttpAccessException
Send a PUT request to Elastic Search server- Parameters:
strURI- the uristrJSON- the json- Returns:
- the string
- Throws:
fr.paris.lutece.util.httpaccess.HttpAccessException- http access exception
-
POST
public String POST(String strURI, String strJSON) throws fr.paris.lutece.util.httpaccess.HttpAccessException
Send a POST request to Elastic Search server- Parameters:
strURI- the uristrJSON- the json- Returns:
- the string
- Throws:
fr.paris.lutece.util.httpaccess.HttpAccessException- http access exception
-
-