http webharvest tag not working with http-param parameters

211 views Asked by At

I am trying the below code in webharvest

 <var-def name="url">https://www.athome.com/on/demandware.store/Sites-athome-Site/default/Stores-FindByZip?</var-def>

<var-def name="urlResult">
 <html-to-xml>
 <http url="${url}" method="GET"  >
     <http-param name="Content-Type">text/html;charset=UTF-8</http-param>   
    <http-param name="dwfrm_storelocator_countryCode">US</http-param>
    <http-param name="dwfrm_storelocator_distanceUnit">mi</http-param>
    <http-param name="dwfrm_storelocator_postalCode">07054</http-param>
    <http-param name="dwfrm_storelocator_maxdistance">999999</http-param>
    <http-param name="dwfrm_storelocator_findbyzip">Search</http-param>
</http> 
</html-to-xml>
</var-def>

I get the error stating There was an error processing your request.

Screenshot of the error is Error Screenshot

But when i define the url with all the parameters, then i get the intended result

 <var-def name="url"><template>https://www.athome.com/on/demandware.store /Sites-athome-Site/default/Stores-FindByZip?dwfrm_storelocator_countryCode=US&amp;dwfrm_storelocator_distanceUnit=mi&amp;dwfrm_storelocator_postalCode=07054&amp;dwfrm_storelocator_maxdistance=999999&amp;dwfrm_storelocator_findbyzip=Search</template></var-def>

<var-def name="urlResult">
     <html-to-xml>
     <http url="${url}" method="GET">
        </http> 
    </html-to-xml>
    </var-def> 

Why we have this kind of differing behavior ?

Thank you !

0

There are 0 answers