• Clayton Coleman's avatar
    Avoid double decoding all client responses · ce187f9c
    Clayton Coleman authored
    restclient must be able to deal with multiple types of servers. Alter
    the behavior of restclient.Result#Raw() to not process the body on
    error, but instead to return the generic error (which still matches the
    error checking cases in api/error like IsBadRequest). If the caller uses
    .Error(), .Into(), or .Get(), try decoding the body as a Status.
    
    For older servers, continue to default apiVersion "v1" when calling
    restclient.Result#Error(). This was only for 1.1 servers and the
    extensions group, which we have since fixed.
    
    This removes a double decode of very large objects (like LIST).
    ce187f9c
Name
Last commit
Last update
..
fake Loading commit data...
BUILD Loading commit data...
client.go Loading commit data...
client_test.go Loading commit data...
config.go Loading commit data...
config_test.go Loading commit data...
plugin.go Loading commit data...
plugin_test.go Loading commit data...
request.go Loading commit data...
request_test.go Loading commit data...
transport.go Loading commit data...
url_utils.go Loading commit data...
url_utils_test.go Loading commit data...
urlbackoff.go Loading commit data...
urlbackoff_test.go Loading commit data...
versions.go Loading commit data...