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

Unable to post files with different content types and names #204

Open
salungh opened this issue Aug 29, 2018 · 0 comments
Open

Unable to post files with different content types and names #204

salungh opened this issue Aug 29, 2018 · 0 comments

Comments

@salungh
Copy link

salungh commented Aug 29, 2018

I'm trying to post two files that corresponds to a part of one message with content-type application/xml and bodytext/plain. In postman I go to form data POST and give the key=metadata and value=file1 path (xml) and Key=0 and value=file2 path(txt) and it works fine and I'm able to insert. I'm supposed to use the same name for the files while inserting i.e. metadata and 0 respectively. This is what I have done through robot to imitate this behavior and it always returns a 500 Internal server error.
Insert Data
${auth}= Create List ${ID} ${SECRET}
${params}= Create Dictionary Key=${value} app=${apps}
${headers}= Create Dictionary Content-Type=multipart/form-data
Create Session mysession ${URL} auth=${auth} max_retries=10 backoff_factor=0.2
${metadata}= get binary file ${CURDIR}${/}insert.xml
${0}= get binary file ${CURDIR}${/}messageInsertion1.txt
${fileParts} create dictionary file1=${metadata} file2=${0}
${resp}= Post Request retain /messages params=${params} headers=${headers} files=${fileParts}
Response Code Should Be Success ${resp}

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