Http Client
- class opensearchpy.client.http.HttpClient(client)[source]
Bases:
NamespacedClient
- Parameters:
client (Client) –
- delete(url, headers=None, params=None, body=None)[source]
Perform a DELETE request and return the data.
- Parameters:
url (str) – absolute url (without host) to target
headers (Mapping[str, Any] | None) – dictionary of headers, will be handed over to the underlying
Connection
classparams (Mapping[str, Any] | None) – dictionary of query parameters, will be handed over to the underlying
Connection
class for serializationbody (Any | None) – body of the request, will be serialized using serializer and passed to the connection
url –
headers –
params –
body –
- Return type:
- get(url, headers=None, params=None, body=None)[source]
Perform a GET request and return the data.
- Parameters:
url (str) – absolute url (without host) to target
headers (Mapping[str, Any] | None) – dictionary of headers, will be handed over to the underlying
Connection
classparams (Mapping[str, Any] | None) – dictionary of query parameters, will be handed over to the underlying
Connection
class for serializationbody (Any | None) – body of the request, will be serialized using serializer and passed to the connection
url –
headers –
params –
body –
- Return type:
- head(url, headers=None, params=None, body=None)[source]
Perform a HEAD request and return the data.
- Parameters:
url (str) – absolute url (without host) to target
headers (Mapping[str, Any] | None) – dictionary of headers, will be handed over to the underlying
Connection
classparams (Mapping[str, Any] | None) – dictionary of query parameters, will be handed over to the underlying
Connection
class for serializationbody (Any | None) – body of the request, will be serialized using serializer and passed to the connection
url –
headers –
params –
body –
- Return type:
- post(url, headers=None, params=None, body=None)[source]
Perform a POST request and return the data.
- Parameters:
url (str) – absolute url (without host) to target
headers (Mapping[str, Any] | None) – dictionary of headers, will be handed over to the underlying
Connection
classparams (Mapping[str, Any] | None) – dictionary of query parameters, will be handed over to the underlying
Connection
class for serializationbody (Any | None) – body of the request, will be serialized using serializer and passed to the connection
url –
headers –
params –
body –
- Return type:
- put(url, headers=None, params=None, body=None)[source]
Perform a PUT request and return the data.
- Parameters:
url (str) – absolute url (without host) to target
headers (Mapping[str, Any] | None) – dictionary of headers, will be handed over to the underlying
Connection
classparams (Mapping[str, Any] | None) – dictionary of query parameters, will be handed over to the underlying
Connection
class for serializationbody (Any | None) – body of the request, will be serialized using serializer and passed to the connection
url –
headers –
params –
body –
- Return type: