general-notes | My notes
kandi X-RAY | general-notes Summary
kandi X-RAY | general-notes Summary
My notes
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of general-notes
general-notes Key Features
general-notes Examples and Code Snippets
Community Discussions
Trending Discussions on general-notes
QUESTION
I'm trying to gather some data from an API that requires POST parameters like this
...ANSWER
Answered 2018-Dec-10 at 22:36- You want to convert the curl command to Google Apps Script.
If my understanding is correct and the server you want to use needs the values as the form data, how about this modification?
Modification points:- In your curl command, the values of
addr=test1&addr=test2
is sent as the form of"addr": ["test1", "test2"]
.- At your 1st try, the array of
addr
cannot be parsed. - At your 2nd try, only
addr: "test2"
is sent because of the same key is used.
- At your 1st try, the array of
When above points are reflected to the script, the modified script is as follows.
Modified script:In this modification, options
was modified. I think that this is the same result with @TheMaster.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install general-notes
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page