|
StripeKit 0.1.1
Stripe integration toolkit for C++
|
A request StripeKit wants sent to Stripe. More...
#include <HTTPClient.h>
Public Attributes | |
| HttpMethod | method = HttpMethod::Get |
| Method to use. | |
| std::string | path |
| Path relative to the Stripe API base URL, for example "/v1/customers". | |
| std::unordered_map< std::string, std::string > | headers |
| Headers StripeKit needs sent. | |
| std::string | body |
| The request body, already encoded as "application/x-www-form-urlencoded". | |
| RequestOptions | options |
| Per-call settings the adapter must honour. | |
A request StripeKit wants sent to Stripe.
StripeKit fills this in; the adapter turns it into a real HTTP request.
Definition at line 42 of file HTTPClient.h.
| HttpMethod stripekit::HttpRequest::method = HttpMethod::Get |
Method to use.
Definition at line 44 of file HTTPClient.h.
| std::string stripekit::HttpRequest::path |
Path relative to the Stripe API base URL, for example "/v1/customers".
Join it to the base URL, normally "https://api.stripe.com".
Definition at line 51 of file HTTPClient.h.
| std::unordered_map<std::string, std::string> stripekit::HttpRequest::headers |
Headers StripeKit needs sent.
The adapter adds its own on top, notably the "Authorization" header carrying the secret key.
Definition at line 59 of file HTTPClient.h.
| std::string stripekit::HttpRequest::body |
The request body, already encoded as "application/x-www-form-urlencoded".
Send it unchanged. Stripe's API does not accept JSON request bodies.
Definition at line 66 of file HTTPClient.h.
| RequestOptions stripekit::HttpRequest::options |
Per-call settings the adapter must honour.
idempotency_key becomes the "Idempotency-Key" header when set, timeout overrides the adapter's default, and headers are merged over the adapter's defaults. Ignoring the idempotency key means a retried call can charge a customer twice.
Definition at line 76 of file HTTPClient.h.