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
0 answers

download an image file and add it to Put Request

I need to download a file from an url and use a put request to upload it somewhere else Download is done with r=requests.get(image_url, auth=HTTPBasicAuth( user , password)) header_content_type = r.headers.get('content-type') fileType =…
Jörg Lang
  • 171
  • 1
  • 1
  • 8
0
votes
1 answer

Why use PUT when POST is doing the same? Specifically in Laravel

Well I know about the idompotence of HTTP methods. I also know about what PUT and POST are specifically used for in REST API. But the question is why use PUT when POST is doing the same. Take the example of Laravel (PHP Framework), In Laravel we…
0
votes
1 answer

Why is Superagent not keeping any of the information about this movie?

I have a react setup where I am using superagent to upload files to a google storage bucket. The request uses a signed url to send to the bucket and looks like the following. The first part is how we use filereader and get the signed urls from the…
user592419
  • 5,103
  • 9
  • 42
  • 67
0
votes
0 answers

How to find and edit a single field with MongoDB collections

I have a database with MongoDB that's storing my notes and users. I want a function that will send a put request using "userId" and "note". Then analyze whether or not the noteID exists for that particular user. If it does, then modify. If it…
Chen W
  • 119
  • 2
  • 12
0
votes
3 answers

PutMapping 403 forbidden

I'm trying to do one update with http protocol Using "put" verb but i get 403 forbidden with Request Method: OPTIONS from chrome. If i try to change verb from PUT to POST it work. Here my Server code ( spring ) @PutMapping("/path") public…
Pippi
  • 313
  • 1
  • 4
  • 18
0
votes
1 answer

Angular 7 HttpClient: ToPromise does not work with put request

I'm trying to create an HTTP put request API using express that calls a function upon competition. I successfully got the API calls to update the database but the functions within .then() and .catch() are not being called. Does toPromise() not work…
Han Wang
  • 79
  • 2
  • 7
0
votes
2 answers

Is it a good convention to add parameter on PUT method?

Say, The put method can return includeExtraTitle field by the given param However, Is it a good idea to add param on PUT method? Is this a good practice? @PutMapping(value = "/articles/{articleId}") Article put(@RequestParam(value =…
newBike
  • 14,385
  • 29
  • 109
  • 192
0
votes
2 answers

how can add only one data?

@PutMapping("/api/cricketer/{id}") public ResponseEntity updateCricketer(@PathVariable("id") Long id, @RequestBody Cricketer cricketer) { Cricketer cCricketer = cricketerService.findById(id); …
yefesin
  • 7
  • 1
0
votes
0 answers

Data is passed as null in invoke-webrequest put method

When I send input to PowerShell put request it throws an internal error. This is the response I got: "message": "Internal Error" "status": "failed" The code snippet is as follows: $input_data=@" { "share": { "users": [ { …
0
votes
1 answer

Why am I getting headers embedded to files uploaded to S3 using JMeter?

Whenever uploading a file (json) to S3 using JMeter's HTTP Request sampler the uploaded file contains the HTTP headers at the top of the file. I am using a signed URL (with actual…
Liam
  • 143
  • 2
  • 7
0
votes
0 answers

Update input field using PUT method

I am trying to update some details of a user from input fields of my website to the database using the method PUT. The method GET to get data from my database is working. By working I mean it is receiving data from my database in the input…
Ömer Uyar
  • 21
  • 1
  • 6
0
votes
0 answers

put() missing 1 required positional argument: 'pk'

I am new in Django and I am trying to update record. but when I run put method, An error show like that => put() missing 1 required positional argument: 'pk' Here is my view => from rest_framework.generics import get_object_or_404 from…
lwin
  • 3,784
  • 6
  • 25
  • 46
0
votes
1 answer

How to PUT a binary file with javascript/jQuery to webdav?

How can I PUT a binary file, say an image with an HTTP PUT request to webdav? I already tried base64 encoding, but the file is broken. $.ajax({ url: url + file, data:base64content, type: 'PUT', crossDomain: true, …
0
votes
3 answers

Vue Axios doesnt return response

I have problem with vue axios. I am trying to send data using get / put but I can not read it on the server side. Using POST everything works, so I do not know what the problem is. Btw. Everything works in PostMan. axios({ method: 'PUT', …
0
votes
2 answers

Lodash _.merge function not overwriting properties with updated information

In my user edit route, I am trying to use the Lodash merge function to update the returned user document (from Mongoose) with the updates sent in req.body. Here is my code: const { dobYear, dobMonth, dobDay } = req.body; const dob =…
ipenguin67
  • 1,483
  • 5
  • 22
  • 39
1 2 3
99
100