Questions tagged [http-put]

HTTP PUT Uploads a representation of the specified resource.

HTTP PUT Uploads a representation of the specified resource.

277 questions
6
votes
3 answers

How to rename resources in an idempotent manner?

I implemented an API that renames a company as follows: PUT /companies/A { "name": "B" } will return HTTP 301 with the Location header pointing at the company's new URI: /companies/B. How can I make this operation idempotent with and without…
Gili
  • 86,244
  • 97
  • 390
  • 689
5
votes
1 answer

DbContext Update vs EntityState Modified

What is the difference between _context.Entry(entity).State = EntityState.Modified and _context.Entity.Update(entity) in ASP.NET EF Core? For example: [HttpPut] public async Task> PutStudent(Student student) { …
GW7
  • 77
  • 1
  • 5
5
votes
1 answer

how to upload file using http put in android?

I have a REST web service and android. Now I want to request Http Put using android to call web service. In my REST web service if user want to do Http Put he can request in terminal like this : curl -H…
sudo
  • 1,525
  • 7
  • 34
  • 59
5
votes
1 answer

PHP ZF2 - Restful controller Backbone PUT method incorrect parsing

I have an issue with my ZF2 based application and Backbone at frontend. Somewhere at frontent I run this.model.save({ city_id: parseInt( this.$el.find( '#city_id' ).val() ), from: this.$el.find( '#from' ).val(), to: this.$el.find( '#to'…
zelibobla
  • 1,498
  • 1
  • 16
  • 23
4
votes
2 answers

Rest Api: When to use Post, PUT, PATCH and Delete

I am working on a restful api and I need to update a resource (i.e. a customer detail record with 10 fields). On Add request, I send a Post request with complete record. On update request, I send a PUT request with complete record of 10 fields.…
TAB
  • 1,944
  • 8
  • 28
  • 45
4
votes
4 answers

retrofit2 sending a PUT request method is wrong for PHP

I am trying to send a PUT request method from my Android app to my PHP endpoint but in my endpoint the PUT request is not recognized as a PUT request so I return Request method is wrong! message from my endpoint. Android interface and request…
Robert
  • 10,403
  • 14
  • 67
  • 117
4
votes
0 answers

File uploading Not getting regular callback response?

I am trying to upload a 20mb video file to cloud using http put method. File is uploading as byte array format. To show the progress of upload, I add progress callback with entity. But now I'm getting the call back response after uploading the full…
4
votes
2 answers

Should I allow sending complete structures when using PUT for updates in a REST API or not?

I am designing a REST API and I wonder what the recommended way to handle updates to resources would be. More specifically, I would allow updates through a PUT on the resource, but what should I allow in the body of the PUT request? Always the…
dafmetal
  • 795
  • 1
  • 6
  • 18
4
votes
1 answer

Oracle mod_plsql does not implement PUT and DELETE HTTP requests

I am running Oracle-Application-Server-10g and using mod_plsql for webserver. While webserver accepts HTTP requests such as POST, DELETE and HEAD, I can not find a way in setting it to accept other HTTP requests such as PUT and DELETE. Sending PUT…
tomtom
  • 41
  • 1
4
votes
1 answer

In ASP.Net Web API, how do you fake PUT and DELETE?

I'm experimenting with ASP.Net Web API, which, by convention, splits controller methods into a Restful style of Get(), Put, Post and Delete. My question is how does one handle the PUT and DELETE requests that might come from a non-Ajax browser…
John
  • 3,332
  • 5
  • 33
  • 55
4
votes
1 answer

Servicing HTTP PUT from .ashx handler in ASP.NET without tweaking file permissions

I've got an .ASHX handler I want to use to process an HTTP PUT to allow me to upload files to the web server--the .ASHX file actually uploaded data and sticks the file elsewhere, so it never actually touches the disk here. I've set the web.config to…
Garrett Serack
  • 943
  • 7
  • 17
4
votes
2 answers

how to get a httppostedfile from a ASP.NET Web API (POST or PUT) call?

Actually my question is short. How can I get a HttpPostedFile from a ASP.NET Web API POST or PUT? I did see that I can get various information from the Request like Request.Header, Request.Content, Request.Properties. Where in there can I find the…
SwissCoder
  • 2,514
  • 4
  • 28
  • 40
3
votes
3 answers

JMeter File Upload with HTTP Put Method Not Working

The idea is to build a sampler in JMeter that will upload a file using the HTTP PUT method. I'm trying to follow the official documentation to specify the entire content body as a file with no parameter name. What should happen: The file gets…
Joe
  • 4,585
  • 3
  • 37
  • 51
3
votes
3 answers

Method to trick ASP.NET to process HTTP PUT as POST?

I have a web cam that can send an image via HTTP PUT to a web server. I'd like to process this in ASP.NET MVC, but it doesn't natively support PUT. Is there any way to trick it into treating the request as a POST? I'm looking to get the Request.Form…
Brian Vallelunga
  • 9,869
  • 15
  • 60
  • 87
3
votes
2 answers

Read data from HTTP PUT

I am currently implementing a RESTful web service which talks XML using CodeIgniter and REST by Phil Sturgeon. I am now stuck at how to read XML from HTTP PUT. This is what I did. At the client side: $(function(){ // Bind a click event to the…
AmeL
  • 31
  • 1
  • 3
1 2
3
18 19