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 @@ -543,15 +543,15 @@ func (cfg *RequestConfig) Execute() (err error) {
543543 return nil
544544 }
545545
546- // If the response happens to be a byte array, deserialize the body as-is.
547546 switch dst := cfg .ResponseBodyInto .(type ) {
547+ // If the response happens to be a byte array, deserialize the body as-is.
548548 case * []byte :
549549 * dst = contents
550- }
551-
552- err = json . NewDecoder ( bytes . NewReader ( contents )). Decode ( cfg . ResponseBodyInto )
553- if err != nil {
554- return fmt . Errorf ( "error parsing response json: %w" , err )
550+ default :
551+ err = json . NewDecoder ( bytes . NewReader ( contents )). Decode ( cfg . ResponseBodyInto )
552+ if err != nil {
553+ return fmt . Errorf ( "error parsing response json: %w" , err )
554+ }
555555 }
556556
557557 return nil
You can’t perform that action at this time.
0 commit comments