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

Send data for cleanup and present endpoints in the request body #29

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

arturo-seijas
Copy link
Collaborator

@arturo-seijas arturo-seijas commented Feb 26, 2024

Applicable spec: https://go-acme.github.io/lego/dns/httpreq/

Overview

Send data for cleanup and present endpoints in the request body instead of in the form

Rationale

See spec

Module Changes

views.py

Checklist

  • The contributing guide was applied
  • The PR is tagged with appropriate label (urgent, trivial, complex)

@arturo-seijas arturo-seijas requested a review from a team as a code owner February 26, 2024 08:26
Copy link

Test coverage for 0764784

Name                                                   Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------------------------------------------------
httprequest_lego_provider/__init__.py                      1      0      0      0   100%
httprequest_lego_provider/apps.py                          5      0      0      0   100%
httprequest_lego_provider/dns.py                          61      0      8      0   100%
httprequest_lego_provider/forms.py                        20      0      2      0   100%
httprequest_lego_provider/migrations/0001_initial.py       8      0      0      0   100%
httprequest_lego_provider/migrations/__init__.py           0      0      0      0   100%
httprequest_lego_provider/models.py                       10      0      0      0   100%
httprequest_lego_provider/serializers.py                  11      0      0      0   100%
httprequest_lego_provider/settings.py                      6      0      0      0   100%
httprequest_lego_provider/urls.py                          8      0      0      0   100%
httprequest_lego_provider/views.py                        48      0      8      0   100%
--------------------------------------------------------------------------------------------------
TOTAL                                                    178      0     18      0   100%

Static code analysis report

Run started:2024-02-26 08:28:31.115699

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 876
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Copy link

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

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

LGTM, i believe it doesn't need to be application/json?

@arturo-seijas arturo-seijas merged commit 889087f into main Feb 26, 2024
13 checks passed
@arturo-seijas arturo-seijas deleted the send-data-in-request-body branch February 26, 2024 08:54
@arturo-seijas
Copy link
Collaborator Author

LGTM, i believe it doesn't need to be application/json?

There's no need to specify it

@weiiwang01
Copy link
Contributor

Okay, maybe I am a little bit late on this, but you can actually do this in requests.

import requests

session = requests.session()
session.post("https://httpbin.org/anything", json={"foobar": 123})

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

Successfully merging this pull request may close these issues.

5 participants