c# - Making LinkedIn API request using Hammock .net web library -


i'm doing integration linkedin apis using c# , hammock libray.

i'm stuck trying use messaging api... error saying "couldn't parse mailbox-item document: error: unexpected end of file after null".

it seams post content going empty don't know...

here's code:

restclient client = new restclient();  client.authority = "http://api.linkedin.com/v1"; client.credentials = credentials; //client.method = webmethod.post;  byte[] msg = encoding.default.getbytes(doc.outerxml); client.addpostcontent(msg);   restrequest request = new restrequest(); request.path = "/people/~/mailbox"; request.method = webmethod.post; //request.addpostcontent(msg);   restresponse response = client.request(request); 

my xml (that goes in msg variable) is:

<?xml version="1.0" encoding="utf-8"?> <mailbox-item>  <recipients>   <recipient>    <person path="/people/~" />   </recipient>  </recipients>  <subject>teste</subject>  <body>teste</body> </mailbox-item> 

thanks in advance.

in code, line adds post content commented out!


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -