How to call php curl for given json post request [duplicate] - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Saturday, June 5, 2021

How to call php curl for given json post request [duplicate]

I have api application/json post request in documentation.

curl -X POST https://api.printnode.com/printjobs \
    -u 44784dd8d88be9631046ff83e9044419ff824b10: \
    -H "Content-Type: application/json" \
    -d '{
            "printerId": 34,
            "title": "My Test PrintJob",
            "contentType": "pdf_uri",
            "content": "http:\/\/sometest.com\/pdfhere",
            "source": "api documentation!"
    }'

i want to call it from php curl. How i can do that?

Thanks



source https://stackoverflow.com/questions/67842076/how-to-call-php-curl-for-given-json-post-request

No comments:

Post a Comment