Skip to content

Commit

Permalink
allow other content like images as well
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-goebel committed Nov 24, 2023
1 parent 8e28126 commit b1cf1b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func ReadWithStatusCode[T any](request *http.Request, timeout time.Duration, che
} else if _, ok := interface{}(value).(string); ok {
return any(string(payload)).(T), statusCode, nil
} else {
return value, statusCode, fmt.Errorf("invalid payload format: %v", string(payload))
return any(payload).(T), statusCode, nil
}
}

Expand Down

0 comments on commit b1cf1b9

Please sign in to comment.