Closed xiekeyang closed 7 years ago
I'm not sure: only req.Header.Set("Accept")
seems not enough.
Should add more checking? :
if resp.Header.Get("Content-type") != "application/vnd.oci.ref-engines.v1+json; charset=utf-8"{
return err
}
@wking mentioned profit of context
in 1, and give this parameter to refengine.Engine
interface functions. However I'm not sure if it will really be used. In current code it seems do nothing.
I agree in a net service context
help to shutdown some handler gracefully, and can update context key/value under go routine. But if it is as well needed in a our HTTP client?
Signed-off-by: xiekeyang xiekeyang@huawei.com