File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -540,15 +540,15 @@ func (cfg *RequestConfig) Execute() (err error) {
540540 return nil
541541 }
542542
543- // If the response happens to be a byte array, deserialize the body as-is.
544543 switch dst := cfg .ResponseBodyInto .(type ) {
544+ // If the response happens to be a byte array, deserialize the body as-is.
545545 case * []byte :
546546 * dst = contents
547- }
548-
549- err = json . NewDecoder ( bytes . NewReader ( contents )). Decode ( cfg . ResponseBodyInto )
550- if err != nil {
551- return fmt . Errorf ( "error parsing response json: %w" , err )
547+ default :
548+ err = json . NewDecoder ( bytes . NewReader ( contents )). Decode ( cfg . ResponseBodyInto )
549+ if err != nil {
550+ return fmt . Errorf ( "error parsing response json: %w" , err )
551+ }
552552 }
553553
554554 return nil
You can’t perform that action at this time.
0 commit comments