Login
Back to bricks list
Introduction Version

ExternalApiService

This class gives possibility to make http requests to external APIs

Functions

DELETE - @classmethod

Make an HTTP get request

Parameters:
NameTypeDefault valueDescription
urlstr
headersDict
raise_exception_if_errorbool False
timeoutint 60
Return type:
Response
GET - @classmethod

Make an HTTP get request

Parameters:
NameTypeDefault valueDescription
urlstr
headersDict
raise_exception_if_errorbool False
timeoutint 60
Return type:
Response
POST - @classmethod

Make an HTTP post request

Parameters:
NameTypeDefault valueDescription
urlstr
bodyAny
headersDict
raise_exception_if_errorbool False
timeoutint 60
Return type:
Response
PUT - @classmethod

Make an HTTP put request

Parameters:
NameTypeDefault valueDescription
urlstr
bodyAny
headersDict
filesAny
raise_exception_if_errorbool False
timeoutint 60
Return type:
Response
PUT_FORM_DATA - @classmethod

Make an HTTP put request

Parameters:
NameTypeDefault valueDescription
urlstr
dataAny
headersDict
filesAny
raise_exception_if_errorbool False
timeoutint 60
Return type:
Response
RAISE_ERROR_FROM_RESPONSE - @classmethod
Parameters:
NameTypeDefault valueDescription
responseResponse