Open brettwillis opened 1 year ago
Also, why are issues disabled on this repo?
Facing this sonar issue : Cross-site Request Forgery (CSRF) [High Severity][https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459] in axios@0.26.1 introduced by @sendgrid/mail@7.7.0 > @sendgrid/client@7.7.0 > axios@0.26.1
Fixes
The
ClientRequest
type (alias ofRequestOptions
) inClient.setDefaultRequest
has required fieldurl
.This means, when using
Client.setDefaultRequest({ httpsAgent: new https.Agent() })
, for example, TypeScript will error with fieldurl
is missing.This PR makes the type partial, so all fields are optional which reflects the actual behaviour.
Checklist