GenericRequestsWrapper#

class langchain_community.utilities.requests.GenericRequestsWrapper[source]#

Bases: BaseModel

Lightweight wrapper around requests library.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param aiosession: ClientSession | None = None#
param auth: Any | None = None#
param headers: Dict[str, str] | None = None#
param response_content_type: Literal['text', 'json'] = 'text'#
param verify: bool = True#
async adelete(url: str, **kwargs: Any) str | Dict[str, Any][source]#

DELETE the URL and return the text asynchronously.

Parameters:
  • url (str) –

  • kwargs (Any) –

Return type:

str | Dict[str, Any]

async aget(url: str, **kwargs: Any) str | Dict[str, Any][source]#

GET the URL and return the text asynchronously.

Parameters:
  • url (str) –

  • kwargs (Any) –

Return type:

str | Dict[str, Any]

async apatch(url: str, data: Dict[str, Any], **kwargs: Any) str | Dict[str, Any][source]#

PATCH the URL and return the text asynchronously.

Parameters:
  • url (str) –

  • data (Dict[str, Any]) –

  • kwargs (Any) –

Return type:

str | Dict[str, Any]

async apost(url: str, data: Dict[str, Any], **kwargs: Any) str | Dict[str, Any][source]#

POST to the URL and return the text asynchronously.

Parameters:
  • url (str) –

  • data (Dict[str, Any]) –

  • kwargs (Any) –

Return type:

str | Dict[str, Any]

async aput(url: str, data: Dict[str, Any], **kwargs: Any) str | Dict[str, Any][source]#

PUT the URL and return the text asynchronously.

Parameters:
  • url (str) –

  • data (Dict[str, Any]) –

  • kwargs (Any) –

Return type:

str | Dict[str, Any]

delete(url: str, **kwargs: Any) str | Dict[str, Any][source]#

DELETE the URL and return the text.

Parameters:
  • url (str) –

  • kwargs (Any) –

Return type:

str | Dict[str, Any]

get(url: str, **kwargs: Any) str | Dict[str, Any][source]#

GET the URL and return the text.

Parameters:
  • url (str) –

  • kwargs (Any) –

Return type:

str | Dict[str, Any]

patch(url: str, data: Dict[str, Any], **kwargs: Any) str | Dict[str, Any][source]#

PATCH the URL and return the text.

Parameters:
  • url (str) –

  • data (Dict[str, Any]) –

  • kwargs (Any) –

Return type:

str | Dict[str, Any]

post(url: str, data: Dict[str, Any], **kwargs: Any) str | Dict[str, Any][source]#

POST to the URL and return the text.

Parameters:
  • url (str) –

  • data (Dict[str, Any]) –

  • kwargs (Any) –

Return type:

str | Dict[str, Any]

put(url: str, data: Dict[str, Any], **kwargs: Any) str | Dict[str, Any][source]#

PUT the URL and return the text.

Parameters:
  • url (str) –

  • data (Dict[str, Any]) –

  • kwargs (Any) –

Return type:

str | Dict[str, Any]

property requests: Requests#