vendredi 14 février 2020

How can I pass the small and large jsonPayload more efficiently?

Currently I am testing rest APIs E2E and I am passing the Json payload as a string like this I also created a Model to hold different payloads but HTTPWebResponse can not convert to string. Any ideas how can I pass these JSonPayload and also Large payloads for efficiently

 public HttpWebResponse UpdateEndpointsFromTags(int id, int parent_id)
        {
            RequestHandler requestor = new RequestHandler(BaseUrl + "UpdateEndpointsFromTags", HttpVerb.POST, AuthenticationType.Bearer);
            var requestJSON = "[ { \"id\": " + id + ", \"parentId\": " + parent_id + " } ]";
            var response = requestor.SendRequest(requestJSON);
            return response;
        }

Aucun commentaire:

Enregistrer un commentaire