88#define AWS_JSON_CLIENT_H
99
1010#include < aws/core/Core_EXPORTS.h>
11- #include < aws/core/client/AWSClient .h>
11+ #include < aws/core/client/AWSProtocolClient .h>
1212
1313namespace Aws
1414{
@@ -31,10 +31,10 @@ namespace Aws
3131 * AWSClient that handles marshalling json response bodies. You would inherit from this class
3232 * to create a client that uses Json as its payload format.
3333 */
34- class AWS_CORE_API AWSJsonClient : public AWSClient
34+ class AWS_CORE_API AWSJsonClient : public AWSProtocolClient<JsonOutcome, Utils::Json::JsonValue>
3535 {
3636 public:
37- typedef AWSClient BASECLASS;
37+ typedef AWSProtocolClient<JsonOutcome, Utils::Json::JsonValue> BASECLASS;
3838
3939 /* *
4040 * Simply calls AWSClient constructor.
@@ -55,60 +55,10 @@ namespace Aws
5555 protected:
5656 template <typename OutcomeT, typename ClientT, typename AWSEndpointT, typename RequestT, typename HandlerT>
5757 friend class BidirectionalEventStreamingTask ; // allow BidirectionalEventStreamingTask to MakeRequests
58- /* *
59- * Converts/Parses an http response into a meaningful AWSError object using the json message structure.
60- */
61- virtual AWSError<CoreErrors> BuildAWSError (const std::shared_ptr<Aws::Http::HttpResponse>& response) const override ;
62-
63- /* *
64- * Returns a Json document or an error from the request. Does some marshalling json and raw streams,
65- * then just calls AttemptExhaustively.
66- *
67- * method defaults to POST
68- */
69- JsonOutcome MakeRequest (const Aws::AmazonWebServiceRequest& request,
70- const Aws::Endpoint::AWSEndpoint& endpoint,
71- Http::HttpMethod method = Http::HttpMethod::HTTP_POST,
72- const char * signerName = Aws::Auth::SIGV4_SIGNER,
73- const char * signerRegionOverride = nullptr ,
74- const char * signerServiceNameOverride = nullptr ) const ;
75-
76- JsonOutcome MakeRequest (const Aws::Endpoint::AWSEndpoint& endpoint,
77- Http::HttpMethod method = Http::HttpMethod::HTTP_POST,
78- const char * signerName = Aws::Auth::SIGV4_SIGNER,
79- const char * signerRegionOverride = nullptr ,
80- const char * signerServiceNameOverride = nullptr ) const ;
81-
82- /* *
83- * Returns a Json document or an error from the request. Does some marshalling json and raw streams,
84- * then just calls AttemptExhaustively.
85- *
86- * method defaults to POST
87- */
88- JsonOutcome MakeRequest (const Aws::Http::URI& uri,
89- const Aws::AmazonWebServiceRequest& request,
90- Http::HttpMethod method = Http::HttpMethod::HTTP_POST,
91- const char * signerName = Aws::Auth::SIGV4_SIGNER,
92- const char * signerRegionOverride = nullptr ,
93- const char * signerServiceNameOverride = nullptr ) const ;
94-
95- /* *
96- * Returns a Json document or an error from the request. Does some marshalling json and raw streams,
97- * then just calls AttemptExhaustively.
98- *
99- * requestName is used for metrics and defaults to empty string, to avoid empty names in metrics provide a valid
100- * name.
101- *
102- * method defaults to POST
103- */
104- JsonOutcome MakeRequest (const Aws::Http::URI& uri,
105- Http::HttpMethod method = Http::HttpMethod::HTTP_POST,
106- const char * signerName = Aws::Auth::SIGV4_SIGNER,
107- const char * requestName = " " ,
108- const char * signerRegionOverride = nullptr ,
109- const char * signerServiceNameOverride = nullptr ) const ;
11058
111- JsonOutcome MakeEventStreamRequest (std::shared_ptr<Aws::Http::HttpRequest>& request) const ;
59+ private:
60+ AWSError<CoreErrors> CreateParseError () const override ;
61+ const char * GetClientLogTag () const override ;
11262 };
11363 } // namespace Client
11464} // namespace Aws
0 commit comments