Welcome Guest, Not a member yet? Register   Sign In
curlrequest - help
#1

(This post was last modified: 08-15-2021, 11:36 PM by chakycool.)

HI,

I'm trying to call a REST API using the curlrequest service and I think I go the post syntax wrong. Can someone help me.

PHP Code:
$client single_service('curlrequest');
 
$result $client->post($keys->url.'/v2/', [
                    'headers' => [
                              'Content-Type' => 'application/json',
                                'Authorization' => 'JWT '.$access->token,
                                'x-api-key'    => $keys->key
                                
],
                    'body' => $payload,
                    'debug' => true              
                
]); 

This syntax is not posting the body payload, everything else is fine.
Reply


Messages In This Thread
curlrequest - help - by chakycool - 08-15-2021, 11:44 AM
RE: curlrequest - help - by InsiteFX - 08-17-2021, 01:10 AM
RE: curlrequest - help - by chakycool - 08-19-2021, 02:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB