Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to set variable data in JSON body for the code that generated by Postman in c#

int variable_age= 72;
var body = @"{
" + "
" +
@"    ""Pclass"": ""2"",
" + "
" +
@"    ""Age"": "{variable_age}""
" + "
" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #set #variable #data #JSON #body #code #generated #Postman
ADD COMMENT
Topic
Name
5+4 =