How can I upload a file to the current web SiteAssets or document library using the spfx httpClient? Is there a code sample I can learn from?
I much prefer using the new PnP-JS-Core to do file uploading. It's a nice library from PnP and provides a fluent API for the REST endpoints - as a bonus it works with traditional, sprequestexecutor or node-fetch and supports REST batching.
https://github.com/OfficeDev/PnP-JS-Core/
https://github.com/pnp/pnpjs
https://blogs.msdn.microsoft.com/patrickrodgers/
The Files.Add method would be here:
http://officedev.github.io/PnP-JS-Core/classes/_sharepoint_rest_files_.files.html#add
I'm not aware of any code samples specifically for the new framework but you can refer to the SharePoint REST API File Documentation for the available operations or this example that demonstrates how to upload a file using the REST API. Note that both the documentation and example assume you're using the cross-domain library which is not needed in the new framework so the URLs to the services are going to be a bit different. For example in the new framework you don't need the SP.AppContextSite(@target) portions of the url.
Hope that helps