Skip to content

Instantly share code, notes, and snippets.

View joncalhoun's full-sized avatar
💻
Making Go Courses

Jon Calhoun joncalhoun

💻
Making Go Courses
View GitHub Profile
@joncalhoun
joncalhoun / output.json
Created October 29, 2012 16:21
EasyPost cURL Example Output
{
"rates":[
{
"carrier":"USPS",
"service":"Priority",
"rate":"15.30"
}
]
}
@joncalhoun
joncalhoun / easypost-curl.sh
Created October 29, 2012 16:21
EasyPost cURL Example
curl https://www.easypost.co/api/postage/rates \
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \
-d 'to[zip]=94107' \
-d 'from[zip]=94019' \
-d 'parcel[predefined_package]=LargeFlatRateBox' \
-d 'parcel[weight]=100.0'
@joncalhoun
joncalhoun / output.json
Created October 29, 2012 16:17
EasyPost cURL Example Output
{
"error":"Invalid sender data."
}
@joncalhoun
joncalhoun / easypost-curl.sh
Created October 29, 2012 16:16
EasyPost cURL Example
curl https://www.easypost.co/api/postage/buy \
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \
-d 'to[name]=Jon Calhoun' \
-d 'to[street1]=388 Townsend St' \
-d 'to[street2]=Apt 20' \
-d 'to[city]=San Francisco' \
-d 'to[state]=CA' \
-d 'to[zip]=94107' \
-d 'from[name]=Jarrett Streebin' \
-d 'from[phone]=3235950799' \
@joncalhoun
joncalhoun / output.json
Created October 29, 2012 16:09
EasyPost cURL Example Output
{
"rate":{
"carrier":"USPS",
"service":"Express",
"rate":"11.11"
},
"tracking_code":"xxxxxxxxxx",
"label_file_name":"test.png",
"label_file_type":"image/png",
"label_url":"https://www.easypost.co/assets/test.png"
@joncalhoun
joncalhoun / easypost-curl.sh
Created October 29, 2012 16:00
EasyPost cURL Example
curl https://www.easypost.co/api/postage/buy \
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \
-d 'to[name]=Jon Calhoun' \
-d 'to[street1]=388 Townsend St' \
-d 'to[street2]=Apt 20' \
-d 'to[city]=San Francisco' \
-d 'to[state]=CA' \
-d 'to[zip]=94107' \
-d 'from[name]=Jarrett Streebin' \
-d 'from[phone]=3237078576' \
@joncalhoun
joncalhoun / output.json
Created October 29, 2012 15:49
EasyPost cURL Example Output
{
"error":"Invalid sender data. This must include a 5 digit zip code"
}
@joncalhoun
joncalhoun / easypost-curl.sh
Created October 29, 2012 15:49
EasyPost cURL Example
curl https://www.easypost.co/api/postage/rates \
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \
-d 'to[zip]=94107' \
-d 'parcel[length]=10.0' \
-d 'parcel[width]=5.0' \
-d 'parcel[height]=8.0' \
-d 'parcel[weight]=100.0'
@joncalhoun
joncalhoun / output.json
Created October 29, 2012 14:34
EasyPost cURL Example Output
{
"rates":[
{
"carrier":"USPS",
"service":"Priority",
"rate":"9.12"
},{
"carrier":"USPS",
"service":"Express",
"rate":"26.94"
@joncalhoun
joncalhoun / easypost-curl.sh
Created October 29, 2012 14:30
EasyPost cURL Example
curl https://www.easypost.co/api/postage/rates \
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \
-d 'to[zip]=94107' \
-d 'from[zip]=94019' \
-d 'parcel[length]=10.0' \
-d 'parcel[width]=5.0' \
-d 'parcel[height]=8.0' \
-d 'parcel[weight]=100.0'