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

[BUG] key value of json property should not be considered as json #32

Closed
cedric05 opened this issue Mar 10, 2021 · 0 comments
Closed

[BUG] key value of json property should not be considered as json #32

cedric05 opened this issue Mar 10, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@cedric05
Copy link
Owner

@name('get')
POST 'https://{{host=httpbin.org}}/post'
"header" : "header2"
json(
{
    {{prop}}: "value"
})

property with below fails
prop = '{"hai": "google"}'

@cedric05 cedric05 changed the title JSON property loading [BUG] key value of json property should not be considered as json Mar 10, 2021
@cedric05 cedric05 added the bug Something isn't working label Mar 11, 2021
cedric05 added a commit that referenced this issue Mar 18, 2021
@cedric05 cedric05 mentioned this issue Mar 20, 2021
cedric05 added a commit that referenced this issue Mar 20, 2021
#24 [new] provide randomstr support
#32 [fixes] allow properties to have more than one equals
#33 [feature] allow env variables to have json vaule
cedric05 added a commit that referenced this issue Jun 5, 2021
* better error reporting

* added logging for better tracking

* in middle of json

* more tasks

* json payload complete

* in middle of adding tests

* allow comments in json for property file

* added few simple test cases.

* json test cases. need to add substituion tests

* `python -m unittest` will test all

* substitution tests complete. need to work on json comments.

* substitution tests complete

* few fixes

* added placeholder for tests.

* added placeholder for tests.

* fix bugs found by tests

* info logs

* command line property error

* basic auth, cookie

* in middle of installable package

* dothttp-cli installable package, single file, folder

* docker publish to github

* update workflow

* fix name

* release to github

* formatter

* fix tests

* json format fix

* stdout for formatting. grouping commandline args.

* - default headers defined in prop file
- property value in http file itself
- property syntax with double paranthesis
- comments
- payload 's data should support json - -> form input

* fixed few tasks from #4

* fix formatting for data section when input is json

* in middle of pyoxidizer

* property validation, json file validation, cookie save failure proceed

* whitespace is ignored, unless specified in quotes.
for in file variable substitutions

* readme and bug fix for propertys

* add few unit tests

* add tests, few are more direct need to add more assertions

* test output of curl and formatter.

* Update Dockerfile

* using multiple files, pyinstaller, workable in most unix

* windows docker file

* formatter has issues with comments. need to rewrite from beginning

* few formatting fixes

* extension link

* pipfile

* bugs reporting

* fix query params bug

* added substituion tests

* fix bugs found via test cases

* bug with multiple substitutions

* print output path

* experimental phase, of string matching

* alphanumeric then write normally otherwise go for double or single quotes

* http file issue

* fix github actions

* Update TASKS.md

* formatter has issues with comments. need to rewrite from beginning

* update version

* setup.py fix requirements, add console package

* setup.py fix requirements, add console package

* update README.md

* platform specific

* platform specific

* next steps

* initial extension phase

* added error handling in response

* naming requests, only useful in ide

* multiple requests in same file, although i prefer not to have in that manner. but hey

* fix exception message

* trailing ',' are allowed now in data and json. so, no problem commenting few params

* add license (#8)

* calling http.http is bad, changed it to urlwrap and adding trailing ',' to data, files, json

* on error, return error. flush right after writing to cmdline (helpful for listening stdout)

* added error handling in response

* target tests

* better messaging

* trailing commas are ok with dothttp [tests]

* added tests to commands

* [bug] target id starts with 0

* allow curl

* tasks

* threading

* multi line curl and easy sharable file

* check for similar names

* added resources

* fix tests

* validate name is working now

* fix multipart payload with actual data

* using typings for models, helpful for debugging and working

* add models

* added tests for more scenarios

* better example

* update version

* update version

* Update README.md

* variable need not have to be defined first time
libmagic is not mandatory

* install flask only when needed, os specific tests

* postman import complete. currently file creation is done in server side

* Fixes #21 #22 #18 #23

* postman unquote values

* swagger schema

* var string

* var string

* fix todos

* move json parsing out of core logic

* fix json key var

* added test and fixes #27 #28

* #15 postman improvements

* libmagic is not must

* goal rewamp

* generate http from requests

* fix line endings

* fix $

* fix readme

* version update

* send updated http def

* subs test on each section.

* remove flask

* update

* #24 provide random properties complete. adding tests pending

* example update

* update version and schema

* added tests for random

* fixes #32

* allow properties to have more than one equals

* [Feature] allow env variables to have json vaule #33

* fix tests

* added tests for env with json structure

* value with templates in randomstring

* better outline

* fixes cedric05/dothttp-runner#31

* content execute

* fixes #37

* query started having `[` `]` in the generated httpdef

* fix input issue

* wasm first steps

* loadable dothttp in wasm

* import fix

* provide url information, for symbols request

* remove unused

* apply patches with version is not working fixed

* temporarly disable mimetype for data part of multipart upload.

* fix running tests, added tests for content execute

* added tests for postman

* include version in command

* run postimport tests for all variants

* #50 provide api to parsed structure

* fix tests

* fix multipart file har generation failed

* Bump urllib3 from 1.26.3 to 1.26.4

Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.3 to 1.26.4.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@1.26.3...1.26.4)

Signed-off-by: dependabot[bot] <[email protected]>

* Update requirements.txt

* version update

* mime type not included

* fix tests

* fix tests

* Create Dockerfile

* no escape quoted string for data payload in httpdef #54

* no escape quoted string for data payload in httpdef #54

* lazy ','

* Merge main into dev

* json substition with multiline

* generate curl should print in multi line #59

* update curl request

* Multipart add content-type for files according to file extension #61

* fix failing tests

* Bump autopep8 from 1.5.5 to 1.5.6 (#55)

Bumps [autopep8](https://github.com/hhatto/autopep8) from 1.5.5 to 1.5.6.
- [Release notes](https://github.com/hhatto/autopep8/releases)
- [Commits](hhatto/autopep8@v1.5.5...v1.5.6)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump ipython from 7.20.0 to 7.22.0 (#56)

Bumps [ipython](https://github.com/ipython/ipython) from 7.20.0 to 7.22.0.
- [Release notes](https://github.com/ipython/ipython/releases)
- [Commits](ipython/ipython@7.20.0...7.22.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump python-magic from 0.4.18 to 0.4.22 (#57)

Bumps [python-magic](https://github.com/ahupp/python-magic) from 0.4.18 to 0.4.22.
- [Release notes](https://github.com/ahupp/python-magic/releases)
- [Changelog](https://github.com/ahupp/python-magic/blob/master/CHANGELOG)
- [Commits](ahupp/python-magic@0.4.18...0.4.22)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump pyinstaller from 4.2 to 4.3 (#60)

Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 4.2 to 4.3.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](pyinstaller/pyinstaller@v4.2...v4.3)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* header is not generated for curl generation

* fix issue with content execute cedric05/dothttp-runner#51

* self.file (simple hack for now)

* content names

* content name handler

* fix regression of names

* 0.0.16 version

* include method

* multiline in json

* randomStr substitute not working fixed

* 0.0.17 development start

* int values are sent as float fixed

* smileys and chineese chars not working fixed

* multiline fix for json strings

* #73 fix

* allows curl like headers, curl like method, for easy transition

* better support for curl (only few are supported)

* single letter header value fix

* generate curl should be  useable

* set post incase of payload available.

* fix https://github.com/cedric05/dothttp-runner/issues/70

* #77 support string breaks

* content execute not working

* fix curl script

* initial changes

* working setup.py

* tests for script execution

* isEquals is required for nested Check

* fix json

* skeptical about multipart having string breaks, currently added for json

* Bump urllib3 from 1.26.4 to 1.26.5 (#83)

Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.4 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@1.26.4...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix generated httpdef missing basic auth #84

* postman import basic auth missing #85

* Bump urllib3 from 1.26.4 to 1.26.5 (#86)

Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.4 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@1.26.4...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Create CodeQL.yaml

* root array json payload is failing #87

* codeql, is taking too much of github actions

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant