Avalanche: assign variable use within HTTP Content Files for dynamic POST requests


Doc ID    SOL10008
Version:    9.0
Status:    Published
Published date:    06/16/2015
Created Date:    05/05/2011
 

Objective/Summary

  • Outlines Avalanche configuration steps for HTTP POSTs using http content file with assign variables / spivariables

Environment/Versions

  • Avalanche Commander
  • HTTP / HTTPS
  • POST

Procedure

  1. Variables must first be assigned in the client/actions tab
          Example actions:
          ASSIGN VARIABLE <myvar1 "MYVALUESTRING">
          1 POST http://192.168.1.1/<POST_FILE="mycontent" CONTENT_TYPE="text/html">
 
     2.   Next this value can be assigned within an 'HTTP content file' by enabling 'Process Spi Variables' and calling to within the http content file body:
 
          Example HTTP content file named 'mycontent':
          mycontent abcdefg<SpiVariable>myvar1</SpiVariable>1234567
 
Here the myvar1 variable from our action list will be assigned between the <SpiVariable></SpiVariable> tags sending the following POST body:
 
          abcdefgMYVALUESTRING1234567

Notes

  • If you need to capture dynamic values from a server response see doc id SOL10010
  • The Content-Type will need to be the same for all POSTs as this is a static set value on the client/actions POST line

 

Find Answers

Specified Languages
English
中文

Please Sign In

Username
Password

Did you forget your password?
Click here for assistance

New user? Start here.