Hi team.
I tried following Benjamin Fadina's instructions on consuming REST service from Pixabay. PicturePuller solution.
The original worked as supposed (thanks Benjamin!) but I wanted to see if I could do the same in the latest Radzen version.
Without writing FetchImages() Task but using the REST API as a data source from the Radzen IDE. i.e, scaffolding the REST instead of defining it in C#.
Documentaton: Pixabay API Documentation .
I've tried both for just pictures, which lands on the root ( https://pixabay.com/api/?key=xxxxxxxxxxxxxxx ) and \videos ( https://pixabay.com/api/videos/?key=xxxxxxxxxxxxxxx )
- to no avail. Speaking of which, what do we put in Data Source -> ... -> Resource, when the final endpoint is the root base. Just "/" , which would double the backslashes?
In the Pixabay's pictures, the main endpoint is https://pixabay.com/api/, and the Resource is the same - no "subfolder" there. Putting https://pixabay.com/api/?key=xxxxxxxxxxxxxxx
right in the browser shows up data.
Also, I hope I'm using correctly "in Header" for the API Key authorization, and not "in Query string". Although I tried both, seemed to give me the same result ...
The record shows up, the fields too but no data displayed in the grid, only the column's headers.
With the debugging info in the Radzen's output:
==
Dotnet: fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'lPEy7aMgb8XYUokSZMjIAodOLNg8kkP25YwkIzYxfV4'.
System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
==
Fairly self-explanatory. I know I haven't constructed the request correctly, but I'm not sure where I'm making mistake(s). If I'm not going deep enough in the api's levels.
No filtering query with the "q=yellow+flowers" concatenation, just the basic show it all.
I tried both :5001 and :5000 , https and http.
Snapshots attached.
Thanks in advance,
Sime
PS Spotify example works well, but it's an OAuth, and has "subfolders" for endpoints.