This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Exemplo de CURL preenchendo campos de formulário com -F | |
curl -X POST -F 'tipo_cnpj=dest' -F 'txtCnpj=99999999999’ -F 'tipo_pesquisa=nf' -F 'txtNumDoc=99999’ http://transportadora.local/jamef/ocorrenciaViagem.do | |
#Exemplo de CURL enviando conteúdo em json e modificando headers | |
curl --request POST "http://interno.local/json_decode.php" --header "Content-Type: application/json" --header "MerchantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" --header "MerchantKey: 0123456789012345678901234567890123456789" --header "RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" --data '{"MerchantOrderId":"2014111703","Customer":{"Name":"Comprador crédito simples"},"Payment":{"Type":"CreditCard","Amount":15700,"Installments":1,"SoftDescriptor":"123456789ABCD","CreditCard":{"CardNumber":"4500000000000001”,”Holder":"Teste Holder","ExpirationDate":"12/2030","SecurityCode":"123","Brand":"Visa"}}}' --verbose | |
curl --request POST "http://sandbox.local/try_json/" --header "Content-Type: application/json" --header "DEVICE_ID: 012345678 |