Can I use POST instead of PUT in a NodeJS app? [closed] - mysql

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 25 days ago.
The community reviewed whether to reopen this question 25 days ago and left it closed:
Original close reason(s) were not resolved
Improve this question
What is the difference if I always use POST method to update a row in the MySQL or Cassandra database instead of PUT?
I ask this because when I did research on that I read in some other questions that were saying POST request causes multiple instances creation. I wanted to make sure if is that correct?

The database doesn't care about how the server talks to clients.
Technically you could use POST for everything. That's basically how GraphQL works. But doing that means your API is not RESTful.
These are the basic RESTful API methods:
Method
Description
GET
Retrieve information about the REST API resource
POST
Create a REST API resource
PUT
Update a REST API resource
DELETE
Delete a REST API resource or related component
That being said, if you feel like your use-case works and reads better with just POST or GET, go for it.

Neither mysql nor Cassandra will even be aware if the client made a http put or post request, so from a database point of view it is totally irrelevant which http request type you use.

Related

how to connect api.ai bot to a mysql database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm developing an API.AI chat bot to integrate with a website. This also should be able to query from a MySQL database.
What is the approach to implement this?
You should look at Api.ai's fulfillment documentation. Api.ai uses fulfillment webhooks, a URL you define, and then any intent you indicate should use the webhook will send a HTTP request to the webhook with all the relevant information about the user's query (any parameters, the intent, etc.). You can then connect your fulfillment webhook to the database of your choice and map users queries to SQL queries, get the desired information and return it in a response to the user.
Please keep in mind that Api.ai HTTP requests timeout after 5 seconds, which means from the time Api.ai issues a request to the time that you send back a response must be less than 5 seconds.

iOS - Download json swift [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Good day.
I was faced with the task, can not find the answers on the internet, can anyone be able to help.
I need to send a request to the service. This request must be sent no more than 1 second once per hour. From the answer to the query to extract part of the data. When you receive or availability of this information, it should be added to the text box. Data should be stored and re-used after restarting the application.
To connect to the service, I use Alamofire. Help please, whether there is in this library any function to set the time limit, I request? And how to save the data? Save the new json file locally, or the data stored in an array, or use the database?
Thank you for your help.
I don't have an idea of setting a time limit, but you can explore the NSTimer function to check for that and if it is just a string that you want to store, you only need to use NSUserDefaults for that. It stores your data as a property list and you can access it from anywhere in the app at anytime.
Here's a link to help you setup NSUserDefaults.

Django Celery One request splitting in multiple tasks [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am looking to achieve something like this:
To have one input json request, which will encapsulate what to do than:
split that input into 3 or more sub-requests depending on json, like put in database
an agent will wake up since he is processing one part of that request, like putting data to some server
another agent will woke up since the request is for him too, he will like upload data to some other server
meanwhile another request could do state information about request whats part did executed and finished
Is Django + Celery good for this ?
Main goal is to with one request serve parts independently, so like when processing request when waiting for the server in one part of request will not ommiting other part of request which will be processed without any lag.
If your json contains all sub-requests and can be handled asynchronously, seems like this is a job for RxJava which can handle event based programs using observable sequences. Best to read the docs first to see if they fit your use case.

Redmine REST API -client-server [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
My boss told me to create a REST API using html/css but i'm copletely blocked..
How can we create Redmine RESTful API using html ?
You can't create a REST API only with html. A REST API means that you defines a "resource" and you utilize the HTTP (usually) protocol in order to change the "state" of the resource. For example: the resource is http://example.com/a. You can make a GET request in order to get this resource, POST for changing it and DELETE for deleting it.
As you can see, it's a work with the server and not with the content that the client sees (html) - You need a server-side language, like: Python, Java, Php, etc.
Please tell us if you know a server-side language and we will be able to tell you how you can program a REST API in that language.

What are the steps when an HTML form is submitted using POST method? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
What are the underlying steps of data transmission when a user submits a HTML form using POST method ?
I searched for the answer but mostly it's been talked about the difference between the POST method and the GET method and where to use them.
The simple answer is that all the data of the form is encoded into byte array and put within the message body of a HTTP request. But, it's too general. I'd like to know the specific steps.
Ignoring what the server decides to do with the data, no, not really.
The format of the encoded data is determined by the content-type specified in the form tag, and defaults to pretty much the same as what would be after the "?" in the URL that would've been build if you used method="GET" (see the W3 spec)
The specific steps that are made are related to sending an HTTP request, not to the method which is used (GET/POST/PUT/DELETE/OPTIONS/HEAD).
There are differences between POST and GET - but those differences are mainly due to conventions: Let's take REST web-services for example, GET is used (by convention) to get a resource, while POST is used to CREATE a resource and PUT - to modify an existing one.
There are also some limitation differences, but again - these limitation exist due to implementations, for example:
IE can hold only 2048 characters in the URL, Tomcat Apache supports up to 4000 characters - so GET requests which are made from a browser are limited, while POST request aren't.