Invoke-WebRequest : POST https://SOMEAPIURL with
My favourite address MODIFIED JN Street 100 JNStreet 200 Street 3 (if needed) Street 4 (if needed) Oslo 1234 NO true Mr. JN 93
: 400 Bad Request: This address already exists. To create a unique address, at least one of these fields must be changed: Name, Line 1, Line
2, City, State, Postal Code, Country/Region, Location Code, Attention, Address Owner Type, Local Tax Number, Parent Address.
At C:\ISS p2p GIL\httpwebrequest post addresses.ps1:10 char:1
+ Invoke-WebRequest `
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
The remote server returned an error: (400) Bad Request.
Answers
It works like charm.
Thanks