gihanmalan / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

Support for multipart GET #334

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.try to GET for any multipart data
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by chchakra...@gmail.com on 20 May 2014 at 1:57

GoogleCodeExporter commented 9 years ago
Could you provide an example for this? Or know of a website that I can use to 
try it out?

Original comment by johan.ha...@gmail.com on 21 May 2014 at 1:48

GoogleCodeExporter commented 9 years ago
Also what error message do you get?

Original comment by johan.ha...@gmail.com on 21 May 2014 at 1:49

GoogleCodeExporter commented 9 years ago
Here is my scenario,

I have a form (consider it's like user registration form) where i can enter 
details like
username(String),address(String),photo(octetSteam/inputstream).

for this i can able to 'post' multipart/form-data like as follows using Rest 
assure

File photoFile = new File("test.jpg");
given().multiPart("username", "TestUser").multiPart("photo", 
"testAddress").when().post("/user");

Following are the my scenarios to test
1) To get user details i have a rest API like GET '/user/{userId}' which gives 
user data interms of 'multipart/form-data' 
2) To update only photo rest api PUT '/user/{userID}/photo' which accepts 
'application/octet-stream'
3) After updating i want to GET '/user/{userID}/photo' which give 
'application/octet-stream' 
    so that i can verify whether previous PUT is updated my 'photo' or not?

How i can use Rest assure to test above 3 cases?

thanks in advance

-
Chakrapani.Ch

Original comment by chchakra...@gmail.com on 22 May 2014 at 6:04