0
私は最後の1年間、郵便配達見積りAPIを使用しています。チェックした時点ではうまく機能しています。投稿者APIが動作しない
しかし、今、それは、いくつかのクッキーやキャプチャを有効にしてHTMLテキストに例外をスローして
を動作していないしているようだ、私はpostmates
からいくつかの更新をしないのです場合、私は理解することはできません
ここに私は、私にメールを送信し、我々はあなたのIPをホワイトリストに登録することを確認します
HttpWebRequest req = WebRequest.Create(new Uri("https://api.postmates.com/v1/customers/" + PostmatesCustomerId + "/delivery_quotes")) as HttpWebRequest;
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.Headers.Add("Authorization", "Basic " + Base64string);
StringBuilder paramz = new StringBuilder();
paramz.Append("pickup_address=" + PickUpAddress + "&dropoff_address=" + DeliveryAddress);
byte[] formData =
UTF8Encoding.UTF8.GetBytes(paramz.ToString());
req.ContentLength = formData.Length;
// Send the request:
using (Stream post = req.GetRequestStream())
{
post.Write(formData, 0, formData.Length);
}
string responseString = null;
using (HttpWebResponse resp = req.GetResponse()
as HttpWebResponse)
{
StreamReader reader =
new StreamReader(resp.GetResponseStream());
responseString = reader.ReadToEnd();
}