/*--------------------------------------------------------------------------------------------*/ protected IFabricHttpResponse GetHttpWebResponse(string pFullPath) { IFabricHttpRequest req = vWebReqProv.CreateRequest(pFullPath); req.Method = Method; req.Accept = "application/json"; vSess.RefreshTokenIfNecessary(Path); if (vSess.BearerToken != null) { req.Headers.Add("Authorization", "Bearer " + vSess.BearerToken); } if (Method == "POST" && Post != null) { req.ContentType = "application/x-www-form-urlencoded"; byte [] bytes = Encoding.ASCII.GetBytes(Post); req.ContentLength = bytes.Length; Stream os = req.GetRequestStream(); os.Write(bytes, 0, bytes.Length); os.Close(); } return(vWebReqProv.GetResponse(req)); }
/*--------------------------------------------------------------------------------------------*/ public virtual IFabricHttpResponse GetResponse(IFabricHttpRequest pRequest) { return(new FabricHttpResponse(pRequest.GetResponse())); }