Skip to content

Instantly share code, notes, and snippets.

@mimeoconnect
Created September 9, 2011 17:24
Show Gist options
  • Save mimeoconnect/1206804 to your computer and use it in GitHub Desktop.
Save mimeoconnect/1206804 to your computer and use it in GitHub Desktop.
Doc APIs - Poster - Proof (GET)
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data;
using System.IO;
using System.Net;
using System.Text;
using System.Xml;
namespace Mimeo
{
public class Poster
{
public void Proof()
{
string Proof_ID = "[ID of Returned Proof]";
string userid = "[user id]";
string userkey = "[user key]";
string format = "json";
string environment = "Sandbox";
System.Text.StringBuilder build_url = new System.Text.StringBuilder();
//Sandbox Connection
build_url("https://developer.mimeo.com/api/poster/proof/"+Proof_ID+"/");
build_url("?userid="+userid);
build_url("&userkey="+userkey);
build_url("&format="+format);
build_url("&environment="+environment);
string get_url = build_url();
HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create (get_url);
request.Method = "GET";
string new_product_template = "";
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
// Get the response stream
StreamReader reader = new StreamReader(response.GetResponseStream());
// Console application output
response = reader.ReadToEnd();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment