Tag: jersey 2.0

问题从节点发送REST请求到Jetty

我正在从Node.js发送REST(POST)请求到Jetty时遇到问题。当我从REST客户端发送它相同的工作正常。 这里是节点的js代码: var postheaders = { 'Content-Type' : 'application/json', 'Content-Length' : Buffer.byteLength(jsonObject, 'utf8') }; var optionsPost = { host : '127.0.0.1', // here only the domain name // (no http/https !) port : 8080, path : '/external/session', // the rest of the url with parameters if needed method : 'POST', // do GET headers :postheaders […]