Comments (2)
Hi, can you provide a small snippet so I can reproduce at my end?
from needle.
const endpoint =
https://test-api.test.devenv/`;
const data = {
'title' : 'Test Title',
'createdDate' : new Date(),
file : {
file : 'test/fixtures/local/neil-warnock-warnock.gif',
content_type : 'image/gif'
}
};
const options = {
headers: {
'Token': 'xyz'
},
responseType: 'json',
multipart: true
};
const result = await needle( 'post', endpoint, data, options );`
Have anonymised it quite a bit, but that's the gist of how it's working. If I log out the parameters I receive in the API side the createdDate isn't there. If I change it so that I do .toISOString() instead it works fine, so looks like the issue is due to the date type. If I don't provide 'multipart: true' in the options it will also work.
from needle.
Related Issues (20)
- Incorrect parsing of complex JS nested objects in POST request HOT 5
- Mangled file content when multipart-POSTing a file with a "text/*" content type HOT 2
- Very infrequent TypeError: iconv.encodingExists is not a function
- Tunnelling doesn't work in v3.1.0 HOT 12
- Proposal: Supporting User-Defined "Follow If" Conditions
- Piping needle request to Express response won't set the correct headers
- Multiple Files Upload Renames Input Field
- Uncaught asynchronous error
- Remote end closed socket abruptly errors HOT 2
- a ':' in nonce breaks digest authentication HOT 1
- Digest MD5 not working with Geovision IP Camera
- Uncaught ECONNRESET exception
- needle.get cannot guaranty getting the http stream HOT 2
- FEATURE: Retry HOT 1
- follow_set_cookies -> not working!!!
- Bug in 3.3.0: accidental creation of `global.signal`, gets caught in strict UTs
- README recommends mikeal's request HOT 3
- Doesn't work in Cloudflare Workers HOT 1
- Sorry, I was about to post this issue to a different repo, don't even know how it happened that I posted it here
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from needle.