Contributions
Sent jpg as byte array
I want to send an image which is in local file as byte array. I am trying to post an image -(jpg format) with the request , I have tried the media type as - mixed/form-data/ and url-encoded too, but i see the tool trying to post as base64 as below, <img src="data:image/jpeg;base64,/9j/..values..../2Q==" alt=""/>. Also i have written groovy script to convert from base64 to byte array.Let me know if its incorrect. import org.apache.commons.io.FileUtils import java.util.* //import org.apache.commons.codec.binary.Base64 byte[] fileContent = FileUtils.readFileToByteArray(new File('C:/Users/likith.n/Documents/Test.jpg')); String encodedString = Base64.getEncoder().encodeToString(fileContent); return encodedString Also please let me know how to send it in byte array and mention the media type to send.704Views0likes0Comments- 3 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews1like0Comments
Trim the node value
I am using a POST method in ReadyAPI the response is as follows, <target_URL>: "http:/<servername>:port/k?key=abcdfee= <httpmethod>GET</httpmethod> <targetpayload null="true"/> <isKBANeeded>true</isKBANeeded> Issue 1: Unable to trim only the key value(in red) intarget_URL Issue 2: How to use the fetched key as parameter in other API's as header? Steps performed: - I need the key value (in red) from target_URL to pass as parameter to the next API. Created the propertyTransfer and assigned the value to a variable. But unable to use the value in header for other API.Solved1.4KViews1like2Comments- 3 years agoPlace ReadyAPI QuestionsReadyAPI Questions1KViews0likes0Comments