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

Add Requests::has_capability() which can be used to determine if SSL is available. #251

Closed
wants to merge 2 commits into from
Closed

Conversation

dd32
Copy link
Member

@dd32 dd32 commented Oct 21, 2016

Add Requests::has_capability() which can be used to determine if SSL is available.

An example of it's usage: Requests::has_capability( array( 'ssl' => true ) );

See #250

…L is available.

An example of it's usage: `Requests::has_capability( array( 'ssl' => true ) );`
Copy link
Collaborator

@rmccue rmccue left a comment

Choose a reason for hiding this comment

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

Seems good to me; needs master merging in after we fix the tests in any case.

Adding a test for this method would be good too.

public static function has_capability($capabilities = array()) {
try {
$transport = self::get_transport($capabilities);
} catch(Requests_Exception $e) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Needs a space after catch

@codecov-io
Copy link

Codecov Report

Merging #251 into master will decrease coverage by 0.2%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #251      +/-   ##
=========================================
- Coverage   92.11%   91.9%   -0.21%     
=========================================
  Files          21      21              
  Lines        1762    1767       +5     
=========================================
+ Hits         1623    1624       +1     
- Misses        139     143       +4
Impacted Files Coverage Δ
library/Requests.php 74.33% <0%> (-1.26%) ⬇️
library/Requests/Response/Headers.php 100% <0%> (+4.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87932f5...e5feeed. Read the comment docs.

@schlessera schlessera closed this Jun 18, 2021
@schlessera schlessera deleted the branch WordPress:master June 18, 2021 06:19
@schlessera
Copy link
Member

This PR was closed inadvertently when we changed the stable branch from master to stable. GitHub was supposed to smoothly adapt the PRs to point to the new branch, but this seems to have failed for the cases where the author's branch/fork of the PR is not available anymore.

@jrfnl
Copy link
Member

jrfnl commented Jun 18, 2021

Recreated as #492

@jrfnl jrfnl added this to the 2.0.0 milestone Nov 10, 2021
@jrfnl
Copy link
Member

jrfnl commented Nov 10, 2021

PR #492 has now been merged, so this will be included in the 2.0.0 release.

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.

5 participants