2017-10-10 21 views
0
import groovy.json.JsonSlurper 

def appToken = "8ry+2bvULHbuYMu75bl80vDBYC3sDbq26JUpCNd19Is=" 
def downloadURL = "https://api.thetradedesk.com/v3/myreports/view/9411002/538769/1507695066?sig=C0G46d8hyTJGk8blhW8smgo27JzaWDjaNogtVQaJ-Lg." 

def result 

def process = ["path\\curl.exe", "-X", "GET", downloadURL, 
      "-H", "cache-control: no-cache", 
      "-H", "postman-token: 21cc8561-8e79-0e85-ad60-ea6e4b69dda2", 
      "-H", "ttd-auth:"+appToken] 


result = process.execute() 
/*def slurper = new groovy.json.JsonSlurper() 
def jsonSlurper = slurper.parseText(slurper)*/ 

log.info result.text 

に空白でGETカール==================================== === SOAP UIでgroovyスクリプトより上で実行すると、POSTMANで作業中に空白の応答が返されます。は、サービスの応答がSOAPUI

Pl. Note: App Token expires in every 5 mins so this token wont be valid after my post, please suggest me how to handle GET response using SOAP UI for cURL request? 

答えて

0

あなたのような+使用して変数を連結する1つの文字列として、あなたのコマンドを書いてみてください、それを作成し、実行している間に、あなたのコマンドを確認するために log.info processを行い、その後 def process = "path\\curl.exe -X, GET "+ downloadURL+ "-H, cache-control: no-cache, -H, postman-token: 21cc8561-8e79-0e85-ad60-ea6e4b69dda2, -H, ttd-auth: "+appToken

関連する問題