jeudi 21 novembre 2019

How to consume ASP.NET web API with GET method with JSON format multi parameters and output from PHP

Can anyone help me to get the code for consume ASP.NET web API with GET method with JSON format multi parameters and output from PHP?

Get method receiving jSON formatted parameters and method return JSON file as well.

following the info i got from customer.

The WEB API URL: http://10.121.170.10/WebApi/Test/

Body input in Raw – JSON format: {"ProjectCode":"ABC" ,"FunctionName": "getpkqty" ,"Items":[{ "Item":"xyx-00-012","StartDate":"2018-11-19 00:00:00","EndDate":"2018-11-20 00:00:00"} ,{"Item":"xyx-00-013","StartDate":"2018-11-19 00:00:00","EndDate":"2018-11-20 00:00:00"} ,{"item":"xyz-0005-14","StartDate":"2018-11-19 00:00:00","EndDate":"2018-11-20 00:00:00"} ] }

Output Output will be in JSON format as below: [ { "part": "xyx-00-012", "qty": 200 }, { "item": "xyx-00-013", "qty": 400 }, { "item": "xyz-0005-14", "qty": 135 },} ]

need to consume from PHP,please help.

Aucun commentaire:

Enregistrer un commentaire