Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request.ExecuteRequest throws NullReferenceException when no Authenticator is provided #21

Closed
GoogleCodeExporter opened this issue May 19, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

The following line in Google.Apis.Requests.Request throws a 
NullReferenceException if Authenticator is null:

HttpWebRequest request = 
this.Authenticator.CreateHttpWebRequest(this.Method.HttpMethod, RequestUrl);

This prevents developers to use APIs that don't require authentication, as in 
the following snippet:

Request request = Request.CreateRequest(service, method);
var stream = request.WithParameters(requestParameters).ExecuteRequest()

Original issue reported on code.google.com by ccherub...@google.com on 31 Jan 2011 at 2:07

@GoogleCodeExporter
Copy link
Author

Original comment by davidwat...@google.com on 31 Jan 2011 at 10:58

  • Changed state: Accepted
  • Added labels: Priority-High, Type-Enhancement
  • Removed labels: Priority-Medium, Type-Defect

@GoogleCodeExporter
Copy link
Author

Hi Claudio,
I have added the ability to not supply an Authenticator, I have also added to 
IRequest the method WithDeveloperApiKey(string).
This was added on branch issue_21_AddNullAuthenticatorSuppoort
I will ask paul to pull this change into default.

Original comment by davidwat...@google.com on 1 Feb 2011 at 1:12

  • Changed state: Fixed

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

No branches or pull requests

1 participant