Skip to content

feat: improvement to allow the use of differents content types#575

Merged
camilamaia merged 3 commits intomainfrom
feat/521
Mar 16, 2023
Merged

feat: improvement to allow the use of differents content types#575
camilamaia merged 3 commits intomainfrom
feat/521

Conversation

@uesleicarvalhoo
Copy link
Copy Markdown
Contributor

Description

Change request to use data parameter instead of json and set application/json as default Content-Type

Motivation behind this PR?

This issue #521

What type of change is this?

Feature

Checklist

  • I have added a changelog entry / my PR does not need a new changelog entry. Instructions.
  • I have added/updated unit tests. Instructions.
  • New and existing unit tests pass locally with my changes. Instructions
  • I have self-documented code my changes by adding docstring(s) and comment(s). Instructions
  • Current PR does not significantly decrease the code coverage and docstring coverage.
  • My code follows the style guidelines of this project.
  • I have run ScanAPI locally and manually tested my changes. Instructions.
  • I have squashed my commits. Instructions.

Issue

Closes #521

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 8, 2023

@uesleicarvalhoo your pull request is missing a changelog!

@uesleicarvalhoo uesleicarvalhoo force-pushed the feat/521 branch 2 times, most recently from f27b2a0 to 01e517c Compare March 8, 2023 21:46
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 8, 2023

Codecov Report

Merging #575 (bf2cadc) into main (f1d9d96) will increase coverage by 0.01%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
+ Coverage   97.85%   97.86%   +0.01%     
==========================================
  Files          24       24              
  Lines         745      751       +6     
==========================================
+ Hits          729      735       +6     
  Misses         16       16              
Impacted Files Coverage Δ
scanapi/template_render.py 100.00% <100.00%> (ø)
scanapi/tree/request_node.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Contributor

@Crocmagnon Crocmagnon left a comment

Choose a reason for hiding this comment

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

There are a lot of format related edits, it's currently hard to focus the review on meaningful changes.

Could you please keep them for another PR?

Comment thread CHANGELOG.md Outdated
Comment thread scanapi/tree/request_node.py Outdated
Comment thread tests/unit/tree/request_node/test_run.py
Comment thread scanapi/tree/request_node.py Outdated
Comment thread scanapi/templates/report.html Outdated
Comment thread scanapi/tree/request_node.py Outdated
Comment thread scanapi/tree/request_node.py Outdated
@uesleicarvalhoo uesleicarvalhoo force-pushed the feat/521 branch 5 times, most recently from 64920aa to 51aa84c Compare March 11, 2023 14:59
Comment thread CHANGELOG.md Outdated
Comment thread scanapi/templates/report.html Outdated
allow_redirects=False,
)

test_content_types = [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👏

)

@staticmethod
def _content_type_is_json(headers):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

Copy link
Copy Markdown
Contributor

@Crocmagnon Crocmagnon left a comment

Choose a reason for hiding this comment

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

Still a couple of conversations open

Copy link
Copy Markdown
Member

@camilamaia camilamaia left a comment

Choose a reason for hiding this comment

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

Nice, this is a really cool feature! Thanks for implementing it @uesleicarvalhoo!

It is up to you to implement the suggested tests, but either way, at least for me, it is already good to go 🚀

uesleicarvalhoo and others added 3 commits March 15, 2023 18:11
Co-authored-by: Camila Maia <cmaiacd@gmail.com>
Co-authored-by: Gabriel Augendre <gabriel@augendre.info>
Copy link
Copy Markdown
Member

@camilamaia camilamaia left a comment

Choose a reason for hiding this comment

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

@camilamaia camilamaia merged commit 6925c0b into main Mar 16, 2023
@camilamaia camilamaia deleted the feat/521 branch March 16, 2023 09:07
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.

How do I pass a POST request using Content-Type: application / x-www-form-urlencoded

4 participants