Sampler of 'curl' commands#
header 1#
sub-heading h3#
curl -X POST -i -H "Content-Type: application/hal+json" -H "Authorization: Basic YXBpdXNlcjphcGlwd2Q=" http://apigilityhw.sandbox.loc/status
AUTH=$(echo -ne "$BASIC_AUTH_USER:$BASIC_AUTH_PASSWORD" | base64 --wrap 0)
curl \
--header "Content-Type: application/json" \
--header "Authorization: Basic $AUTH" \
--request POST \
--data '{"key1":"value1", "key2":"value2"}' \
https://example.com/
More examples#
Curl examples for working with Vonage APIs
list-users-sh#
#!/bin/bash
source "../../config.sh"
source "../../jwt.sh"
curl "https://api.nexmo.com/beta/users" \
-H 'Authorization: Bearer '$JWT\
-H 'Content-Type: application/json'
#!/bin/bash
source "../config.sh"
curl -X "DELETE" "https://api.nexmo.com/v2/applications/$VONAGE_APPLICATION_ID" \
-H 'Content-Type: application/json' \
-u "$VONAGE_API_KEY:$VONAGE_API_SECRET"
#!/usr/bin/env bash
source "../../config.sh"
curl -X "POST" "https://rest.nexmo.com/sms/json" \
-d "from=$VONAGE_BRAND_NAME" \
-d "to=$TO_NUMBER" \
-d "text=こんにちは世界" \
-d "type=unicode" \
-d "api_key=$VONAGE_API_KEY" \
-d "api_secret=$VONAGE_API_SECRET"