Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: HTTP::Tiny losing headers for Stripe

by tangent (Parson)
on Jun 26, 2022 at 00:23 UTC ( [id://11145050]=note: print w/replies, xml ) Need Help??


in reply to Re^2: HTTP::Tiny losing headers for Stripe
in thread HTTP::Tiny losing headers for Stripe

No - Stripe takes key/value pairs.
Ah, I see. Still might be an issue sending a perl hash which is not the same as key-value pairs coming from a form. You could try:
'content' => $http->www_form_urlencode( $subscription ), # or just to try getting it to work 'content' => q|"items[0][id]"="x","items[0][price]"="some price"|,

Update: I think you can strike the above as looking at the source for the module post_form does call www_form_urlencode on the content. I'm stumped for the moment.

Replies are listed 'Best First'.
Re^4: HTTP::Tiny losing headers for Stripe
by Bod (Parson) on Jun 26, 2022 at 09:45 UTC

    The reason I'm stumped is that it works providing I don't make a call to the Stripe API followed by another. One call works - two calls don't.

    I've eliminated rate limiting by trying a 5 second delay between calls.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11145050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found