File tree Expand file tree Collapse file tree
src/sap_cloud_sdk/destination Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,20 +16,19 @@ class DestinationHttpClient:
1616 Pre-bakes headers derived from the destination — ERP headers (sap-client,
1717 sap-language), URL.headers.* properties, and auth tokens.
1818
19- Usage::
19+ Usage:
2020
2121 dest = client.get_destination("my-erp")
2222 http = DestinationHttpClient(dest)
2323 response = http.request("GET", "/api/resource")
2424 """
2525
2626 def __init__ (self , destination : Destination ) -> None :
27- if destination .type not in ( DestinationType .HTTP , "HTTP" ) :
27+ if destination .type != DestinationType .HTTP :
2828 raise ValueError (
2929 f"DestinationHttpClient only supports HTTP destinations, got: { destination .type } "
3030 )
3131
32- self ._destination = destination
3332 self ._session = requests .Session ()
3433 self ._session .headers .update (destination .get_headers ())
3534 self ._base_url = destination .url .rstrip ("/" ) if destination .url else ""
You can’t perform that action at this time.
0 commit comments