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

Question about the Params format #1

Open
LiMengyang990726 opened this issue Nov 1, 2019 · 0 comments
Open

Question about the Params format #1

LiMengyang990726 opened this issue Nov 1, 2019 · 0 comments

Comments

@LiMengyang990726
Copy link

Hi! I would like to ask you about the data format for request params

  1. For entity_name: does it need to include path to the file or pure the file name? If I have a file name 1.jpg, and it has a root path of train.zip/class_1, should I parse 1.jpg or train.zip/class_1/1.jpg to the filed entity_name?
    W8@6CB6 @H`M~__)UJ3N}Q

  2. For the entity_content field, I used base64.b64encode(im.tobytes()).decode('utf-8') whereas im is an Image.open() object. I can see the long string of binary code it gives, however, as there is a limitation in the documentation and I didn't check the size, will it work?
    SW(Z26TE_D75S XFRNP %NE

  3. I saw that you did a conversion for the request body through bytes(json.dumps(req),"utf8"), will it work if I just parse a normal dictionary? (Currently I parse it as just a dictionary, it returns response code 200, however it is super slow, and it has the connection timeout issue after sending 107 requests only. Thus, I am not sure if I am parsing the wrong format as the request body)

If you couldn't understand Chinese shown in the above images, please let me know and I apologize for the inconvenience caused. Looking forward to hearing from you soon!

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

No branches or pull requests

1 participant