Custom HTTP Header
toshi0383 opened this issue · comments
We should make HTTP Header fields customisable when Kitchen requests TVML on Network.
Workaround for now is to send network request by yourself, then pass the response XML string to Kitchen.
I think we need to introduce these to archive this goal.
- Pass HTTP Header parameter via
Cookbook
object. - Pass
Response object handler
(type should beNSHTTPURLResponse -> Bool
) viaCookbook
object. Devs can return false if response is invalid, and don't want to proceed to xml parsing.
IMO, we should not let TVJS to send network requests (by TVJS's evaluateScripts
) anymore. So the custom configuration above would affect every network requests in Kitchen.
Therefore, template
URL should not be path for js file anymore, but for xml file.
Done in #44