0

I succeeded with Postman using the below body.(RAW/JSON)

{
    "date": ["20200907", "20200907"],
    "select": [{
    "store_id": "a1129s101",
    "factor": [],
    "image": [],
    "file":["a1129/s101/facc.csv"]
}]
}

But failed when using the below one with "Invoke-WebRequest" command.

$body = @"
{
    "date": ["20200907", "20200907"],
    "select": [{
        "store_id": "a1129s101",
        "factor": [],
        "image": [],
        "file":["a1129/s101/facc.csv"]
    }]
}
"@

Does anyone know how I can solve this problem?

  • 1
    Hello Phan, please add details of the error and highlight what you want to achieve. Best would be, if you open the console of Postman and send the full contents of the log when you're testing. To open the console, please see https://blog.postman.com/powerful-debugging-with-the-postman-console/ – frankfurt-laravel Sep 08 '20 at 08:58

1 Answers1

0

Thank you everyone who kindly edited my question and kindly asked me for further information.

In Postman, there was "Code" button that can generate code for several types of language . I chose Powershell-Restmethod and generated a code. Already test successfully.

Thank you.