Invoke-RestMethod with public class

Welcome Forums General PowerShell Q&A Invoke-RestMethod with public class

This topic contains 1 reply, has 2 voices, and was last updated by

9 months, 1 week ago.

  • Author
  • #100726

    Points: 1
    Rank: Member

    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
    public string VerificationStatus { get; set; }

    How can I combine them ?

  • #100870

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    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.

The topic ‘Invoke-RestMethod with public class’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort