Skip to content

Add separate createBatch method to propagate batch URLs properly#584

Merged
ianbarber merged 2 commits into
googleapis:masterfrom
ircmaxell:custom_batch_per_service
Jun 17, 2015
Merged

Add separate createBatch method to propagate batch URLs properly#584
ianbarber merged 2 commits into
googleapis:masterfrom
ircmaxell:custom_batch_per_service

Conversation

@ircmaxell
Copy link
Copy Markdown
Contributor

Presently, batch URLs use the system configured global URL and a hard-coded batch path. This PR allows for services to specify the batch end point.

It also fixes a problem with batches not correctly terminating headers when there is no body to the request.

… per-service basis. Fix newline stripping in batching
@googlebot
Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Jun 17, 2015
@ianbarber ianbarber added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Jun 17, 2015
ianbarber added a commit that referenced this pull request Jun 17, 2015
Add separate createBatch method to propagate batch URLs properly
@ianbarber ianbarber merged commit aff1fb6 into googleapis:master Jun 17, 2015
@ircmaxell
Copy link
Copy Markdown
Contributor Author

@erickoledadevrel The default configuration does not contain trailing slashes: https://github.com/google/google-api-php-client/blob/master/src/Google/Config.php#L52 therefore, I took the approach to strip the trailing slash here and then add it at the combination step. I could add it back in the line above, but not really sure the benefit either way...

@erickoledadevrel
Copy link
Copy Markdown

The rootUrl field in the discovery document does contains the slash by default, and since you are naming this field root_url instead of base_path it's probably better to have it respect the format of rootUrl and contain the trailing slash.

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

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants