cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Alternatives to CLR Module Import - How to replace Webclient ?

tomdevilder
Explorer
0 Kudos
306

For calling API's we are using the Webclient (from System.Net import WebClient)

Since importing  .net namespaces or cpq namespaces is no longer possible due this restriction, we need a solution. But in the documentation on the 'Alternatives to CLR Module Import' page there is not trace of this on how to make it work without Webclient

https://help.sap.com/docs/SAP_CPQ/7fc27540a0f14bd1a10b639117a9d4d7/210211e2ddd84124ad23c08ab4e043b3....

Does anyone has an example on how to do it ?

 

View Entire Topic
tomdevilder
Explorer
0 Kudos

Found it out myself:

 
service_url = "https://service_url"
apiKeyServicePlans = "apikey"
accessToken = "accestoken"
 
headers = {"Authorization": "Bearer " + accessToken, "apikey": apiKeyServicePlans}
resp = RestClient.Get(service_url, headers)