Example #1
0
        public async Task <IEnumerable <string> > beginreq(string aa)
        {
            //var req = /*(IRequestBase<IResponseBase>)*/new RequestBase<ResponseBase>(HttpMethod.Post, "http://localhost:5000/", "api/values");
            var postReq = new MyPostReq()
            {
                heihei = new List <int>()
                {
                    1, 2, 3
                }
            };
            var values = await this.ApiClient.ExecuteAsync(postReq);

            var getReq = new MyGettReq()
            {
                heihei = new List <int>()
                {
                    4, 5, 6
                }
            };

            var v2 = await this.ApiClient.ExecuteAsync <ResponseBase <IEnumerable <string> >, IEnumerable <string> >(getReq);


            var x = values.ToList();

            x.AddRange(v2.data);
            return(x);
        }
Example #2
0
        public IResponseBase postreq([FromBody] MyPostReq req)
        {
            this._logger.LogDebug("post--------------------");

            return(new ResponseBase <IEnumerable <string> >(new string[] { "value3", "value4" }));
        }