I changed the parameter string to [] but still i see the following warnings int he script, through the script gets successfully executed.
Here is the script
Any suggestions?
------------------------------
char *request_json_base;
char *request_json;
web_add_header("Content-Type", "application/json; charset=utf-8");
web_add_auto_header("x-vol-site","2238");
web_add_auto_header("x-vol-tenant","21238");
web_add_auto_header("x-vol-locale","en-US");
web_add_auto_header("x-vol-currency","USD");
request_json_base= "{\"Email\":\"{EmailID}\",\"OrderStatus\":\"New\",\"PaymentStatus\":\"AwaitingPayment\",\"FulfillmentStatus\":\"NotFulfilled\",\"Items\":[{\"Id\":\"4031e206-edc9-42d6-9a5c-230e05f0273b\",\"Product\":{\"Name\":\"Test Product\",\"Description\":\"Test Product description\",\"ProductCode\":\"tepee21f81a\",\"Categories\":[{\"Id\":2184}],\"Price\":{\"Price\":0.0000},\"IsTaxable\":true},\"Quantity\":2,\"SubTotal\":1000.0,\"Total\":1000.0}]}";
request_json = lr_eval_string(request_json_base);
lr_save_string(request_json, "REQUEST_JSON_PARAM");
lr_start_transaction("next.Order_CreateOrder");
web_custom_request("CreateOrder",
"URL=http<Hostname>/next.Order.WebApi/orders",
"Method=POST",
"TargetFrame=",
"Resource=0",
"Referer=",
"Mode=HTTP",
"RecContentType=text/html",
"EncType=application/json",
"Body={REQUEST_JSON_PARAM}",
LAST);
lr_end_transaction("next.Order_CreateOrder", LR_AUTO);
RESPONSE:
Notify: max connections per server : 2
Starting action Action.
Action.c(7): web_add_header("Content-Type") started [MsgId: MMSG-26355]
Action.c(7): Warning -26593: The header being added may cause unpredictable results when applied to all ensuing URLs. It is added anyway [MsgId: MWAR-26593]
Action.c(7): web_add_header("Content-Type") highest severity level was "warning" [MsgId: MMSG-26391]
Action.c(8): web_add_auto_header("x-vol-site") started [MsgId: MMSG-26355]
Action.c(8): web_add_auto_header("x-vol-site") was successful [MsgId: MMSG-26392]
Action.c(9): web_add_auto_header("x-vol-tenant") started [MsgId: MMSG-26355]
Action.c(9): web_add_auto_header("x-vol-tenant") was successful [MsgId: MMSG-26392]
Action.c(10): web_add_auto_header("x-vol-locale") started [MsgId: MMSG-26355]
Action.c(10): web_add_auto_header("x-vol-locale") was successful [MsgId: MMSG-26392]
Action.c(11): web_add_auto_header("x-vol-currency") started [MsgId: MMSG-26355]
Action.c(11): web_add_auto_header("x-vol-currency") was successful [MsgId: MMSG-26392]
Action.c(15): Notify: Parameter Substitution: parameter "EmailID" = "
test...@testuser.com"
Action.c(15): Warning: The string '"Id":2184' with parameter delimiters is not a parameter.
Action.c(15): Warning: The string '"Price":0.0000' with parameter delimiters is not a parameter.
Action.c(16): Notify: Saving Parameter "REQUEST_JSON_PARAM = {"Email":"
test...@testuser.com","OrderStatus":"New","PaymentStatus":"AwaitingPayment","FulfillmentStatus":"NotFulfilled","Items":[{"Id":"4031e206-edc9-42d6-9a5c-230e05f0273b","Product":{"Name":"Test Product","Description":"Test Product description","ProductCode":"tepee21f81a","Categories":[{"Id":2184}],"Price":{"Price":0.0000},"IsTaxable":true},"Quantity":2,"SubTotal":1000.0,"Total":1000.0}]}".
Action.c(18): Notify: Transaction "next.Order_CreateOrder" started.
Action.c(19): web_custom_request("CreateOrder") started [MsgId: MMSG-26355]
Action.c(19): Notify: Parameter Substitution: parameter "REQUEST_JSON_PARAM" = "{"Email":"
test...@testuser.com","OrderStatus":"New","PaymentStatus":"AwaitingPayment","FulfillmentStatus":"NotFulfilled","Items":[{"Id":"4031e206-edc9-42d6-9a5c-230e05f0273b","Product":{"Name":"Test Product","Description":"Test Product description","ProductCode":"tepee21f81a","Categories":[{"Id":2184}],"Price":{"Price":0.0000},"IsTaxable":true},"Quantity":2,"SubTotal":1000.0,"Total":1000.0}]}"
Action.c(19): t=5119ms: 294-byte response headers for "
http://<Hostname>/next.Order.WebApi/orders" (RelFrameId=1, Internal ID=1)
Action.c(19): HTTP/1.1 201 Created\r\n