Questions tagged [put]

PUT is a HTTP method which requests that the enclosed entity be stored under the supplied URL.

PUT is a HTTP method which requests that the enclosed entity be stored under the supplied URL. If the URL refers to an already existing resource, the enclosed entity should be considered as a modified version of the one residing on the origin server. If the URL does not point to an existing resource, and that URL is capable of being defined as a new resource by the requesting user agent, the origin server can create the resource with that URL.

References- apache.org, w3.org

2236 questions
0
votes
1 answer

Mongoose findByIdAndUpdate seems to bypass my pre "save" hook and returns stale data

I have a pre "save" hook on my User model for password encryption using bcrypt that works just fine when creating a new user record. However, when editing the user (I'm using findByIdAndUpdate for brevity) and changing the password, it seems to…
ipenguin67
  • 1,483
  • 5
  • 22
  • 39
0
votes
1 answer

How to send JSON data to a REST API?

I'm sending data to a Wordpress site with the WooCommerce plugin installed using libcurl in C++ and the WooCommerce REST API. The data seems to get sent but the expected result is not shown on the website. The purpose of it is to update (modify) the…
Matt
  • 37
  • 1
  • 7
0
votes
0 answers

Put request entity linked to some others entity symfony

i'm stucked on something: i have to entity Profile and Job in the Job entity i have : /** * @var string * @Gedmo\Translatable * @ORM\Column(name="label", type="string", length=255) *…
fvhde.exe
  • 115
  • 7
0
votes
0 answers

With wrk, what is the most efficient way to do a HTTP PUT with a file as a body?

I want to benchmark an application by doing many HTTP PUT request that include files body. I have many files and each file need to be sent only one time. For now I am trying to do that using WRK. One way i have find to do that is to split my data in…
user11579923
0
votes
1 answer

Cannot extract data from post request in node

I am sending a post request using axios in react to a nodejs backend and mysql database. At the server side when I log req.body, it is undefined and this is the params and query part when I log the request on server side: params: {}, query:…
Abdul Ahad
  • 1,221
  • 2
  • 16
  • 28
0
votes
1 answer

How to use path parameters in http.put request

I want to know how to write the PUT request that sends parameters in the path. For example, dev changed the URL for the PUT request from a using a query string as parameters to using parameters in the path. When params were sent as query, I did…
Chris22
  • 1,973
  • 8
  • 37
  • 55
0
votes
1 answer

Uploading data via HTTP PUT without multi-part gutter

I'm trying to upload static HTML+friends content to a raw Nexus 3 repository. As far as the documentation goes, the only way to upload files is using HTTP PUT. Sure enough, curl -v --user 'user:pw' --upload-file my_file.html \ …
Raphael
  • 9,779
  • 5
  • 63
  • 94
0
votes
0 answers

Node.js PUT API request fails first time on server restart. Works the rest of the times

My PUT request always fails the first time after a server restart, but works after the first attempt has failed. My GET/DELETE/POST requests works fine all the time. I tried having the itemid as a const instead of having it as a global variable to…
madvic
  • 123
  • 2
  • 13
0
votes
1 answer

Exception in idempotent PUT request?

I have an issue with implementing Idempotent operation in Put. There is Put request which updates a field in a rest API resource. But to implement Idempotency every repeated request should result in same state of the object. We use a database what…
Dexters
  • 2,419
  • 6
  • 37
  • 57
0
votes
2 answers

UPDATE MySQL incorrect syntax

I am trying to do a put request on the front end but I am getting a mysql error $(function() { $.ajax({ method:"GET", url: "http://localhost:3000/movielist", dataType: "json", success: function (response) { …
Adil Ali
  • 35
  • 4
0
votes
2 answers

How does PUT function different than POST in REST API

I have read many answers about the difference between PUT and POST. The answer provided is PUT is Idempotent in almost all answers. When using a Put, an Id is provided and the complete entity is provided, My doubt is, what difference does it make if…
Tushar Banne
  • 1,587
  • 4
  • 20
  • 38
0
votes
1 answer

How to call the PUT method from a client Java?

I have the method below: @PUT @Path("/reduceEnergy/{id}/{action}") String reduceEnergyConsumption(@PathParam("id") int id, @PathParam("action") String action); I want to call this method from a client. (In case, when…
Ameni HADRICH
  • 17
  • 1
  • 5
0
votes
1 answer

Configure s3 event for alternate PUT operation

I have a Lambda function that gets triggered whenever an object is created in s3 bucket. Now, I need to trigger the Lambda for alternate object creation. Lambda should not be triggered when object is created for the first, third , fifth and so on…
TeeKay
  • 1,025
  • 2
  • 22
  • 60
0
votes
0 answers

How to put variables into a map in a for loop

I am attempting to assign keys and values I took from a text file and parsed into variables into a map but it keeps giving me a NullPointeException. When debugging it tells me that they have values when I am assigning them so I am not sure what the…
0
votes
1 answer

How to model creation of resources using PUT according to the HATEOAS constraint?

Suppose I am developing a RESTful API with a container of items: /items and individual items would be identified by URIs like: /items/{id} What is the best way to describe the fact that new items can be created by PUT request under the HATEOAS…
na6cet
  • 41
  • 2
1 2 3
99
100