You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kilo's WebServiceProxy class provides a vehicle for submitting API requests to a server. For example, this code shows how it could be used to access a "sum" endpoint provided by a simple math service:
While the code is clear and straightforward, it can be simplified. The following code could be used to perform the same operation in a more convenient and type-safe manner:
A more practical example can be found here. It uses the Tiingo End-of-Day API to retrieve historical stock pricing information. The proxy interface looks like this:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Kilo's
WebServiceProxyclass provides a vehicle for submitting API requests to a server. For example, this code shows how it could be used to access a "sum" endpoint provided by a simple math service:While the code is clear and straightforward, it can be simplified. The following code could be used to perform the same operation in a more convenient and type-safe manner:
A more practical example can be found here. It uses the Tiingo End-of-Day API to retrieve historical stock pricing information. The proxy interface looks like this:
It could be used as shown below:
For more information see the README.
Beta Was this translation helpful? Give feedback.
All reactions