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

There are some option to set verify=False to requests? #529

Closed
samueltcsantos opened this issue Mar 18, 2022 · 10 comments · Fixed by #552
Closed

There are some option to set verify=False to requests? #529

samueltcsantos opened this issue Mar 18, 2022 · 10 comments · Fixed by #552
Assignees
Labels
Feature New feature or request

Comments

@samueltcsantos
Copy link

samueltcsantos commented Mar 18, 2022

Environment

  • Operating System: Linux Xubuntu 16.04
  • Python version: 3.6

What you intend to do with scanapi ?

A want make a request to web server running locally with HTTPS enabled, but I need some way to make requests dont verify SSL.

I need something like that?
requests.post(url='https://example.com', data={'bar':'baz'}, verify=False)

Expected behavior ?

There are some option for me reach that, saying to requests include 'verify=False'?

I'm trying to avoid this error:

Error to make request https://127.0.0.1:443/auth/authenticate.
HTTPSConnectionPool(host='127.0.0.1', port=443): Max retries exceeded with url: /auth/authenticate (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))

Thanks in advance!


scanapi has a discord server so feel free to join and say 👋 hello. Maybe share the issue link?

@samueltcsantos samueltcsantos added the Question Further information is requested label Mar 18, 2022
@astenstrasser astenstrasser self-assigned this Apr 21, 2022
@astenstrasser astenstrasser added the Feature New feature or request label Apr 21, 2022
@camilamaia camilamaia removed the Question Further information is requested label Jun 4, 2022
@camilamaia
Copy link
Member

Hey, @samueltcsantos, thanks for the question! Currently, this is not possible. But it makes total sense to have it indeed.

@uesleicarvalhoo
Copy link
Contributor

Hi @camilamaia, if you want, i like to implement this feature, i will open a pull request coming soon :)

@ghost
Copy link

ghost commented Jun 9, 2022

@uesleicarvalhoo thank you for taking this one. If @aalphonsos isn't working(or already hasn't started working) on this, I can assign it to you. 😄

@astenstrasser astenstrasser removed their assignment Jun 10, 2022
@astenstrasser
Copy link
Member

Hi @uesleicarvalhoo, sure you can take it!
Me and @camilamaia were thinking about implementing it in a generic way, so similar options could be also used.
@camilamaia, any suggestions?

@uesleicarvalhoo
Copy link
Contributor

Maybe something with it, where options accept all request.session key words?

endpoints:
  - name: pokeapi
    path: https://localhost:8000/
    verify_tls: false
    endpoints:
      - name: health check
        path: health-check
        requests:
          - name: check if application is alive
            method: get
            options:
              - verify: false
              - timeout: 10
            tests:
              - name: status_code_is_200
                assert: ${{ response.status_code == 200 }}
              - name: response_time_is_under_half_second
                assert: ${{ response.elapsed.total_seconds() < 0.5 }}

@camilamaia
Copy link
Member

@uesleicarvalhoo yeah, we were thinking on something in the exactly way you suggested. With this approach we can accommodate other parameters from requests too!

@uesleicarvalhoo
Copy link
Contributor

Hi @camilamaia, i submitted the pull request, but i got an error in the changlog flow and i have no idea why, can you help me?
#552

@Pradhvan
Copy link
Member

@uesleicarvalhoo replied on the PR. 😄

@uesleicarvalhoo
Copy link
Contributor

Thanks @Pradhvan, fixed!

@samueltcsantos
Copy link
Author

samueltcsantos commented Jul 8, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants