Comments (3)
Good question Greg, let me see if I can modify the source to be a little more flexible with the parameters that are accepted. My guess is that quotes are being added to your integer value when it is sent to your service and that's why it's being rejected. I could see this being an issue with Double and Boolean as well so I'll see if I can adjust it for all of those cases.
With the library expecting strings, it will currently convert your parameter to the following for a POST request: "myInteger":"20"
, which is not the desired behavior. Instead it should be "myInteger":20
so this is definitely something missing from the library and I'll add it right away.
from vba-web.
I've updated the RestRequest class to allow Variant parameters for AddParameter()
and AddQuerystringParameter()
and have successfully tried it with the following example:
Dim PostRequest As New RestRequest
PostRequest.Method = httpPOST
PostRequest.AddParameter "Integer", 20
PostRequest.AddParameter "Double", 3.14
PostRequest.AddParameter "Boolean", True
Debug.Print PostRequest.Body
' -> {"Integer":20,"Double":3.14,"Boolean":true}
PostRequest.Method = httpGET
Debug.Print PostRequest.FormattedResource
' -> ?Integer=20&Double=3.14&Boolean=True
To update your spreadsheet, remove the existing RestRequest class and add the updated version (1.0.2). Seems to be working better now, but let me know if you have any other issues.
from vba-web.
Tim,
Not only helpful software but helpful support as well! If you are ever in London I owe you a pint.
I will test that now and revert is there are any problems.
Greg
from vba-web.
Related Issues (20)
- Can't install this tool HOT 2
- Excel 2016 For Mac 64-Bit Update - 'Internal Errors'
- Run time error 10001: error parsing json expecting "" or ''' HOT 13
- Installation no longer works since the office update HOT 2
- Not sure how to proceed with HttpBasicAuthenticator HOT 1
- Get Json from Google-Drive work on Windows but not on Mac HOT 1
- Update GitHub language breakdown HOT 1
- AWS Authentication
- Uploading a PDF to SharePoint REST API using an ADODB stream HOT 1
- Authenticator for Zoho Creator API
- Calling POST API Content-Type-application/json and getting error "Cannot deserialize the current JSON object" HOT 2
- 保存 HOT 1
- POST API to Verint, the connection is not getting authorised HOT 1
- Excel VBA
- Error with OAuth1.0 Authentication HOT 1
- あ
- Saving Image Response To A PNG File In Mac
- Better version that reads the object properties and makes into a table with headers: HOT 1
- AddQuerystringParam with cyrillic value characters HOT 7
- (Google Authenticator) Access blocked: request is invalid
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 vba-web.