Merge pull request #17253 from DefinitelyTyped/weak-type-errors-in-request

Weak type errors in request
This commit is contained in:
Nathan Shively-Sanders
2017-06-16 10:32:54 -07:00
committed by GitHub
2 changed files with 5 additions and 5 deletions
@@ -186,7 +186,7 @@ rpn({
uri: 'http://service.com/upload',
multipart: [
{
'content-type': 'application/json',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ foo: 'bar', _attachments: { 'message.txt': { follows: true, length: 18, content_type: 'text/plain' } } })
},
{ body: 'I am an attachment' },
@@ -410,7 +410,7 @@ rpn(
uri: 'http://mikeal.iriscouch.com/testjs/' + rand,
multipart:
[{
'content-type': 'application/json',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ foo: 'bar', _attachments: { 'message.txt': { follows: true, length: 18, content_type: 'text/plain' } } })
},
{ body: 'I am an attachment' }
+3 -3
View File
@@ -363,7 +363,7 @@ request({
uri: 'http://service.com/upload',
multipart: [
{
'content-type': 'application/json',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
},
{ body: 'I am an attachment' },
@@ -600,8 +600,8 @@ var rand = Math.floor(Math.random()*100000000).toString();
{ method: 'PUT'
, uri: 'http://mikeal.iriscouch.com/testjs/' + rand
, multipart:
[ { 'content-type': 'application/json'
, body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
[ { headers: { 'content-type': 'application/json' }
, body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
}
, { body: 'I am an attachment' }
]