Please indicate the source if you need to repost.

Restlet allows programmers to use the http request instead of SuiteTalk.

Below is the sample code for .NET coder to begin with:

        private void button1_Click(object sender, EventArgs e)
{
string myUrl = your_restlet_url;
HttpWebRequest request = HttpWebRequest.Create(myUrl) as HttpWebRequest;
request.ContentType = "application/json";
// Account: setup>integration>Web Services Preferences: Account ID
// Email: your NetSuite login email
// Signature: NetSuite login password
// Role: admin = 3
request.Headers.Add("Authorization:NLAuth nlauth_account=1005259,nlauth_email=xxx@netsuite.com,nlauth_signature=,nlauth_role=3");
request.Method = "POST";
string myParam = "{\"mydata1\":1234,\"mydata2\":2345}";
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(myParam);
}
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
}

.NET Sample Code

Below is the sample code of Restlet:

function restlets_post(datain) {
try {
nlapiLogExecution('debug', 'restlets_get', datain.mydata2);
var mystring='{"data1":123,"data2":234}';
var myJson=parseJSON(mystring);
return myJson;
}
catch (ex) {
nlapiLogExecution('debug', 'restlets_post', ex);
}
}

Restlet Code

Hope it helps the life of SuiteTalk developer.

.NET invoke NetSuite Restlet的更多相关文章

  1. Client JQuery invoke NetSuite Suitelet

    Please indicate the source if you need to repost. Client jQuery could initialize a cross-domain requ ...

  2. P/Invoke:C#调用C++

    P/Invoke的全称是Platform Invoke (平台调用) 它实际上是一种函数调用机制通 过P/Invoke我们就可以调用非托管DLL中的函数. P/Invoke依次执行以下操作: 1. 查 ...

  3. C# Invoke或者BeginInvoke的使用

    在Invoke或者BeginInvoke的使用中无一例外地使用了委托Delegate. 一.为什么Control类提供了Invoke和BeginInvoke机制? 关于这个问题的最主要的原因已经是do ...

  4. Invoke的使用情景

    直接看代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Dat ...

  5. 关于控件的Invoke(...)方法和BeginInvoke(...)方法的区别

    这两个方法最主要的区别就是一个是同步,一个是异步,即会阻塞线程,那么阻塞哪个线程呢?我们用代码来分析(工具是VS2010) using System; using System.Collections ...

  6. 多线程、委托、Invoke解决winform界面卡死的问题,并带开关

    一.知识点介绍 1,更新控件的内容,应该调用控件的Invoke方法. Invoke指: 在拥有控件的基础窗口句柄的线程上,用指定的参数列表执行指定委托.该方法接收一个委托类型和委托的参数,因此需要定义 ...

  7. NetSuite Chinese Finance Reports

    NetSuite has a strong report customization application. The standard finance reports has a different ...

  8. (转)C#为什么要使用Invoke,它和BeginInvoke有什么区别

    在Invoke或者BeginInvoke的使用中无一例外地使用了委托Delegate. 一.为什么Control类提供了Invoke和BeginInvoke机制? 关于这个问题的最主要的原因已经是do ...

  9. .NET学习之路----我对P/Invoke技术的理解(一)

    看了P/Invoke技术的介绍,于是想写下点东西,东西包含两个部分:知识的纪录和我的理解及疑问. r托管代码中调用非托管API函数的过程 1.定位包含API的DLL: 2.载入DLL 3.找到DLL中 ...

随机推荐

  1. jmx : ClientCommunicatorAdmin Checker-run

    今天遇到一个问题: 执行bat,关闭jmx的时候,由于程序关闭之后又去连接了一次,cmd窗口报错,类似: 2013-7-11 15:58:05 ClientCommunicatorAdmin rest ...

  2. Atitit  J2EE平台相关规范--39个  3.J2SE平台相关规范--42个

    Atitit  J2EE平台相关规范--39个  3.J2SE平台相关规范--42个 2.J2EE平台相关规范--39个5 XML Parsing Specification16 J2EE Conne ...

  3. fir.im Weekly - 热门 iOS 第三方库大盘点

    本期 fir.im Weekly 收集的热度资源,大部分关于Android.iOS 开发工具.源码和脑洞大开的 UI 动画,希望给你带来更多的工作创意与灵感. 盘点国内程序员不常用的热门iOS第三方库 ...

  4. 更新日志 - BugHD iOS 客户端上线

    中秋.十一长假归来,"满血复活"的我们做了 fir.im 和 BugHD 的优化更新:) BugHD 新增功能 1.iOS 客户端上线 BugHD iOS 客户端上线了,你可以随时 ...

  5. salesforce 零基础学习(二十七)VF页面等待(loading)效果制作

    进行查询的情况下,显示友好的等待效果可以让用户更好的了解目前的状态以及减少用户消极的等待,例如下图所示. VF提供了<apex:actionStatus>标签,,此标签用于显示一个AJAX ...

  6. PHP实现RESTful风格的API实例(一)

    最近看了一些关于RESTful的资料,自己动手也写了一个RESTful实例,以下是源码 目录详情: restful/ Request.php 数据操作类 Response.php 输出类 index. ...

  7. How Google Tests Software - The Life of a TE

    By James WhittakerThe Test Engineer is a newerrole within Google than either SWEs or SETs. As such, ...

  8. js对象、数组转换字符串

    对象转换成字符串需要使用toString()方法. 1 var a = function(){ 2 console.log(111); 3 }; 4 var b = a.toString(); 5 c ...

  9. font-size:100%有什么作用

    h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:normal;} input,select,textarea,samp {font-size:100%;} ...

  10. Bmob基础

    BaaS是指专为移动应用开发者提供整合云后端的服务.开发者无需过多研究服务器端程序,而只需调用云计算平台提供的API,使用相应SDK,就能迅速完成数据存储.账户管理.消息推送.社交网络整合等功能.本文 ...