Invoke-RestMethod with public class

This topic contains 1 reply, has 2 voices, and was last updated by  Don Jones 6 days, 2 hours ago.

  • Author
    Posts
  • #100726

    Arik Cher
    Participant

    I need to check Rest Api .
    the basic is — Invoke-RestMethod -Uri 'http://localhost:94/PathA/file.ashx' —

    I need to add also

    public class CallbackData
    {
    public string CallBackType { get; set; }
    public string Reference { get; set; }
    public string FrontSide { get; set; }
    public VerificationData VerificationData { get; set; }
    }

    public class VerificationData
    {
    [XmlElement("VerificationStatus")]
    public string VerificationStatus { get; set; }

    How can I combine them ?

  • #100870

    Don Jones
    Keymaster

    I'm sorry, I don't understand what you're trying to accomplish.

    Are you asking how to perform Invoke-WebRequest inside the class? You'd need to define a method or a constructor inside the class, which is where you'd put your code that you want to run.

You must be logged in to reply to this topic.