Comments (4)
Currently scanapi only sends json bodies. It's not possible to send urlencoded forms. It could be a feature request though.
from scanapi.
Currently we send the request body using the json
parameter, but we can use the body
parameter (https://github.com/scanapi/scanapi/blob/main/scanapi/tree/request_node.py#L159) and add by default the header Content-Type: application/json
by default, it will solve this problem, what u think about it @camilamaia? I can do it :)
from scanapi.
@uesleicarvalhoo great idea, let's try it!
from scanapi.
.. same problem..
endpoints:
- name: testing
path: https://keycloak..
requests:
- name: token
path: /auth/token
headers:
Content-Type: 'application/x-www-form-urlencoded'
method: post
body:
grant_type: client_credentials
client_id: idexample
client_secret: 71c2-414a-809a-db8ac68cx30b
tests:
- name: status_code_is_200
assert: ${{ response.status_code == 200 }}
My body convert type to binary .. i need x-www-form-urlencoded' as explicit in my headers
from scanapi.
Related Issues (20)
- Fix typos in ```code_evaluator.py``` HOT 1
- Fix typos in ```spec_evaluator.py``` HOT 3
- Cannot import name 'soft_unicode' from 'markupsafe' HOT 2
- There are some option to set verify=False to requests? HOT 10
- Fix pipeline
- Add rich for summary in the console HOT 3
- Report is not printing the test cases
- Update dependencies to current versions HOT 3
- Field Content is not being displayed properly on Chrome HOT 2
- curl generation doesn't take verify: false into account HOT 1
- Poetry Setup job failing in the GitHub workflows
- Update pytest to avoid error when using python 11
- rich 12.1.0 has been yanked
- 🐛 codecov removed from pypi breaking installation of dependencies
- Fix tests
- Show path with variables in report, instead of the real values
- Request dependencies
- The help command does not work HOT 3
- Pyyaml fails to install HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scanapi.