Skip to content

Conversation

@manisha1997
Copy link
Contributor

@manisha1997 manisha1997 commented May 30, 2025

Fixes

Preview PR: twilio/twilio-oai-generator#651

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

@manisha1997 manisha1997 changed the base branch from introduce-context to main June 3, 2025 12:10
func (c *Client) SendRequest(method string, rawURL string, data url.Values,
headers map[string]interface{}, body ...byte) (*http.Response, error) {

return c.SendRequestWithContext(context.TODO(), method, rawURL, data, headers, body...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return c.SendRequestWithContext(context.TODO(), method, rawURL, data, headers, body...)
return c.SendRequestWithContext(context.Background(), method, rawURL, data, headers, body...)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all of these - TODO is "we plan to add context later" but there's no way for us to do that.

Client: client,
Edge: os.Getenv("TWILIO_EDGE"),
Region: os.Getenv("TWILIO_REGION"),
ctx: context.TODO(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where we use this, it makes me nervous that we're using this here

return NewApiService(twilio.NewRequestHandler(client))
}

func NewApiServiceWithCtx(requestHandler *twilio.RequestHandler) *ApiService {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we need this method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants