nikita_1608
8 years agoGuide
Can we have 2 POST calls in an endpoint?
Hi,
I'm calling an url of POST type in an endpoint with different twice.
But the response we are getting is of only one post call, that is the first one.
For example:
<#attempt> <#assign imageURL = http.client.request("https://comunity.com/v1/pop/avatars/image").header("Ocp-Apim-Subscription-Key","key").body('${requestBody}',"application/json").post() /> <#if imageURL.hasError> <error>${imageURL.error.message}</error> <error>${imageURL}</error> <error>${imageURL.error}</error> <#else> <#if imageURL.content??> <#assign res=imageURL.content?eval /> <#assign url = res.url /> ${url} </#if> </#if> <#recover> Error </#attempt> ${parts_array[1]} <#attempt> <#assign imageURL1 = http.client.request("https://community.com/v1/pop/avatars/image").header("Ocp-Apim-Subscription-Key","key").body('${requestBody1}',"application/json").post() /> <#if imageURL1.hasError> <error>${imageURL1.error.message}</error> <error>${imageURL1}</error> <error>${imageURL1.error}</error> <#else> <#if imageURL1.content??> <#assign res1=imageURL1.content?eval /> <#assign url1 = res1.url /> ${url1} </#if> </#if> <#recover> Error </#attempt>
Could anyone help me with this?
Thanks