Forum Discussion

rabih's avatar
rabih
Helper
12 years ago

How do I pull third party data in a custom endpoint?

I'm trying to pull a json data object from a third party api to my custom endpoint with no success. I tried http.client.request("http", "host", "url").json().get() but i got something like this: "lithium.coreapi.webui.template.models.HttpClientResponseTemplateModel@<random_code>".

 

Any help is appreciated!

  • Hi rabih,

     

    have you seen the example code in the TKB for using the http client? There is an example using the http.client object to retrieve and process JSON so you should be able to replicate it in your code.

     

    Hope this helps,

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)

    Hi rabih,

     

    have you seen the example code in the TKB for using the http client? There is an example using the http.client object to retrieve and process JSON so you should be able to replicate it in your code.

     

    Hope this helps,