Comments (6)
That's odd, the exact same code deployed locally with lib http
gives the ParameterError
whereas when deployed to dev with lib up dev
, it seems to work fine.
Nevermind, I was missing the trailing /
in the Postman local URL... Thanks.
from cli.
Hey @alihaghani, would you mind providing a small code sample?
from cli.
This is the function/endpoint.
from cli.
Oh sorry, I meant the calling code. What you have looks good for the endpoint. Is it possible you're not setting the Content-Type of your request to 'application/json'?
from cli.
Got it. I'm doing a POST from Postman with the body as follows:
{
"chores": [
{
"title": "Task 1"
},
{
"title": "Task 2"
}
],
"members": [
{
"name": "Member 1",
"phone": "16040000000"
}
]
}
I also have a header key Content-Type
with the value application/json
as well as a token
in the header. Is my request body malformed?
from cli.
I think I got an example working in postman. Go to File -> Import -> Paste Raw Text and enter the following -
{
"info": {
"_postman_id": "c1cb1c4c-b668-467a-9661-e24cb4c62ca3",
"name": "example",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "post example",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"chores\": [\n {\n \"title\": \"Task 1\"\n },\n {\n \"title\": \"Task 2\"\n }\n ],\n \"members\": [\n {\n \"name\": \"Member 1\",\n \"phone\": \"16040000000\"\n }\n ]\n}"
},
"url": {
"raw": "http://alihaghani.lib.id/abode@dev/initializeHome/",
"protocol": "http",
"host": [
"alihaghani",
"lib",
"id"
],
"path": [
"abode@dev",
"initializeHome",
""
]
}
},
"response": []
}
]
}
Let me know if that works!
from cli.
Related Issues (20)
- 'Bad Request: could not update cache' HOT 2
- Using stdlib behind corporate proxy HOT 4
- pulling(lib get) my service causing error HOT 12
- Error running lib . after lib get HOT 3
- Specify request method in CLI HOT 2
- Publish key in package.json should be set to false by default HOT 4
- encoding issues on stdlib.com using word2vec-pure-js HOT 17
- Can't publish my lib HOT 2
- lib up dev throws "access token is invalid" error HOT 2
- Calling slack Webhooks on external event HOT 2
- Permission to send an SMS has not been enabled for the region indicated by the 'To' number HOT 7
- Creating service from existing dev release of own account HOT 2
- Deployment fails with a specific npm package
- ValidateSamFile
- User must restart the init process if the password is wrong HOT 3
- Use a development resource in a release (production)
- Link New Development Resource - Twitch Account Fails
- undefined@undefined when downloading
- Request for Custom Icons for Discord, Twitter, and GitHub
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 cli.