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 @@ -539,15 +539,15 @@ func (cfg *RequestConfig) Execute() (err error) {
539539 return nil
540540 }
541541
542- // If the response happens to be a byte array, deserialize the body as-is.
543542 switch dst := cfg .ResponseBodyInto .(type ) {
543+ // If the response happens to be a byte array, deserialize the body as-is.
544544 case * []byte :
545545 * dst = contents
546- }
547-
548- err = json . NewDecoder ( bytes . NewReader ( contents )). Decode ( cfg . ResponseBodyInto )
549- if err != nil {
550- return fmt . Errorf ( "error parsing response json: %w" , err )
546+ default :
547+ err = json . NewDecoder ( bytes . NewReader ( contents )). Decode ( cfg . ResponseBodyInto )
548+ if err != nil {
549+ return fmt . Errorf ( "error parsing response json: %w" , err )
550+ }
551551 }
552552
553553 return nil
You can’t perform that action at this time.
0 commit comments