Skip to content

Instantly share code, notes, and snippets.

@michaelcarruthers
Last active December 19, 2015 00:09
Show Gist options
  • Save michaelcarruthers/5866649 to your computer and use it in GitHub Desktop.
Save michaelcarruthers/5866649 to your computer and use it in GitHub Desktop.
connection.request(
:body => "dataset=77a82164-ae77-11e2-aa0c-1fc90b223177&package=awesomepkg",
:headers => headers
:method => :post,
:path => '/my/machines'
)
2013-06-26 11:10:32Z WARN: ErrorSent(requestId=06d4ac57-2c12-4715-8a51-d4f59b081820): HttpCode=400, RestCode=InvalidArgument, message=Invalid Content: Unexpected token ILLEGAL:
HttpError: Invalid Content: Unexpected token ILLEGAL
at /opt/smartdc/cloudapi/node_modules/restify/lib/error.js:21:13
at IncomingMessage.<anonymous> (/opt/smartdc/cloudapi/node_modules/restify/lib/server.js:353:37)
at IncomingMessage.emit (events.js:61:17)
at HTTPParser.onMessageComplete (http.js:133:23)
at CleartextStream.ondata (http.js:1019:22)
at CleartextStream._push (tls.js:303:27)
at SecurePair.cycle (tls.js:574:20)
at EncryptedStream.write (tls.js:96:13)
at Socket.ondata (stream.js:36:26)
at Socket.emit (events.js:64:17)
# Headers variable references
'Accept' => 'application/json',
'Authorization' => signature['Authorization'],
'Content-Type' => 'application/json',
'Date' => signature['Date'],
'X-Api-Version' => '~6.5'
@marsell
Copy link

marsell commented Jun 26, 2013

connection.request(
:headers => headers
:method => :post,
:path => '/my/machines?dataset=77a82164-ae77-11e2-aa0c-1fc90b223177&package=awesomepkg'
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment