dimanche 7 juillet 2019

GET returns data flipkart seller api php

1.I was trying with this code 2.I trying with Get method and change the params as body and url both

enter code here

$url  = "http://api.flipkart.net/sellers/v2/returns?source=customer_return";
        $curl = curl_init(); 
        $json = '{
                  "source": "customer_return"
                }';
        curl_setopt($curl, CURLOPT_URL,$url);

        //curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        //curl_setopt($curl, CURLOPT_POSTFIELDS, $json);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type:application/json',
        'Authorization:Bearer <token>',
        ));
        $result = curl_exec($curl);
        $ee = curl_getinfo($curl);
        echo "<pre>";print_r($result);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire