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

DXE-3958 Error when POSTing raw json #61

Closed
dvhh opened this issue Jun 4, 2024 · 5 comments
Closed

DXE-3958 Error when POSTing raw json #61

dvhh opened this issue Jun 4, 2024 · 5 comments

Comments

@dvhh
Copy link

dvhh commented Jun 4, 2024

Describe the bug
piping json to post on API endpoint on akamai cause the following error

http: error: AttributeError: '_io.BufferedReader' object has no attribute 'len'

To Reproduce
Steps to reproduce the behavior:

  1. run podman run --pull=always --rm -it -v ~/.edgerc:/root/.edgerc -v $PWD:/workdir:rw docker.io/akamai/shell
  2. run http -v --auth-type=edgegrid -a default: POST :/identity-management/v3/user-admin/ui-identities < pay load.json
  3. See error http: error: AttributeError: '_io.BufferedReader' object has no attribute 'len'

Expected behavior
POST data on the API endpoint and see an answer

Screenshots
Not Applicable

Please complete the following information:

  • OS: linux
  • Version : 3.2.2

Additional context
Playload content does not seem relevant for the issue, suspect the issue is caused by edgegrid authentication trying to read the payload for calculating the request signature.

@ckulinsk ckulinsk changed the title [BUG] Error when POSTing raw json DXE-3958 Error when POSTing raw json Jun 5, 2024
@ckulinsk
Copy link

ckulinsk commented Jun 5, 2024

Hi @dvhh

Thank you for reporting this issue. We were able to reproduce it and will inform you about the progress of fix.

Best regards,
Cyryl

@dvhh
Copy link
Author

dvhh commented Jun 7, 2024

Hello @ckulinsk,

In the meantime would you kindly recommend any workaround for posting payload to api endpoint. Currently we wrote a python script in order to do it, but we would appreciate to use any Akamai recommended solution.

@wzagrajcz
Copy link
Contributor

wzagrajcz commented Jun 13, 2024

Hello @dvhh
It seems that the issue is mainly about using the < operator. So something like cat payload.json | http -v --auth-type=edgegrid -a default: POST :/identity-management/v3/user-admin/ui-identities should work. Please let us know if that is sufficient workaround for you until we fix the <.

Best regards,
Wojciech

@dvhh
Copy link
Author

dvhh commented Jun 17, 2024

Hello @wzagrajcz,

This should work for us in the meantime, thanks

@lkowalsk-akamai-com
Copy link

Hi @dvhh, this issue should be resolved now.

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

No branches or pull requests

5 participants