Exemple #1
0
        public static HttpClientRequest SetMultipartContent(
            this HttpClientRequest request,
            string boundary,
            params HttpClientRequest[] requests)
        {
            var content = new MultipartContent(requests, boundary);

            request.SetContent(content);

            var serializers = requests.Select(r => new TextResponseDeserialaizer()).ToArray();

            request.SetDeserializer(new MultipartRequestDeserializer(serializers));

            return(request);
        }
Exemple #2
0
 public static HttpClientRequest SetJsonContent(
     this HttpClientRequest request,
     object serializeableObject)
 => request.SetContent(new JsonContent(serializeableObject));