sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.57k stars 268 forks source link

expose Request API #283

Closed AshfordN closed 3 years ago

AshfordN commented 3 years ago

This exposes the request API, for more granular interaction with sciter requests. This was done following a suggestion from Andrew @c-smile in the forum (see https://sciter.com/forums/topic/hook-res-request/#post-69533). I've tried my best to match the existing coding style of the project, and to bring the feature as close as possible to completion. I'd like feedback particular in the area of error handling. Also, the definitions for SciterResourceType are currently found in types.go. What are your thoughts on moving these definitions to the newly created request.go?

pravic commented 3 years ago

@AshfordN

Also, the definitions for SciterResourceType are currently found in types.go. What are your thoughts on moving these definitions to the newly created request.go?

Makes sense if this is not a breaking change (I think, it's not).

AshfordN commented 3 years ago

All Request API bindings are completed. I've also included an example which demonstrates some of the Request API features. Further testing and suggestions are welcomed. :)