Class ElasticConnexion
java.lang.Object
fr.paris.lutece.plugins.libraryelastic.util.ElasticConnexion
The Class ElasticConnexion.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorElasticConnexion(String strLogin, String strPassword) Basic Authentification constructor -
Method Summary
Modifier and TypeMethodDescriptionSend a DELETE request to Elastic Search serverSend a GET request to Elastic Search serverSend a POST request to Elastic Search serverSend a PUT request to Elastic Search server
-
Constructor Details
-
ElasticConnexion
Basic Authentification constructor- Parameters:
strServerLogin- LoginstrServerPwd- Password
-
ElasticConnexion
public ElasticConnexion()Constructor
-
-
Method Details
-
GET
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
-
DELETE
Send a DELETE request to Elastic Search server- Parameters:
strURI- the uri- Returns:
- the string
- Throws:
fr.paris.lutece.util.httpaccess.HttpAccessException- http access exception
-