Linked Questions

31 votes
3 answers
14k views

Let's say we have a service to add a new hotel: > POST /hotel > <hotel> > <a>aaa</a> > <b>aaa</b> > <c>aaa.......this is 300K</c> > &...
Marcus Leon's user avatar
10 votes
2 answers
8k views

My c#/WebApi server code looks like: [HttpPost] public HttpResponseMessage Logout() { // do some stuff here ... return Request.CreateResponse(HttpStatusCode.OK); } In the client I do an ajax ...
Paul0515's user avatar
  • 25.7k
4 votes
2 answers
7k views

I'm trying to edit my create method in my REST webservice so it should return the newly created ID from the object. I've been trying for the past two days but I must be doing something terribly wrong.....
Perneel's user avatar
  • 3,387
0 votes
1 answer
2k views

What is the most common/industry standard response code for HTTP PUT when: Client made a well-formed request and The content of the file/message/data is empty and Because of that nothing has been ...
kukis's user avatar
  • 4,686
1 vote
1 answer
2k views

I have a route like this -- Route::put('avote', 'voteController@avote')->middleware('auth'); I want to access this route from a ajax send request. When i use this code -- $data = {/* some data ...
Conor's user avatar
  • 2,563
4 votes
2 answers
2k views

One of our APIs has a tasks resource. Consumers of the API might create, delete and update a given task as they wish. If a task is completed (i.e., its status is changed via PUT /tasks/<id>), a ...
cafonso's user avatar
  • 909
3 votes
2 answers
2k views

Far as I understand, PUT request is not supposed to return any content. Consider the client wants to run this pseudo code: x = resource.get({id: 1}); x.field1 = "some update"; resource.put(x); x....
Maksim Gumerov's user avatar
1 vote
2 answers
2k views

For example, I need to update an EntityA. As I am working with DTO's, user needs to transfer DTO for update in Controller. In service layer I extract Entity and update it with DTO fields, then - save ...
user avatar
1 vote
0 answers
1k views

I am implementing a REST api for setting and retrieving a resource. I have been asked to implement a strange PUT, whereby a JSON object is stored, while another JSON object is returned. PUT /object/{...
Matt Thompson's user avatar
1 vote
1 answer
702 views

I don't understand below sentence in MDN Document about PUT. Successful response has body No as if there was a response body, of course. Because most of the other documents say it's possible, ...
Minsik's user avatar
  • 41
-1 votes
2 answers
662 views

I searched "HTTP code for replacing a resource" on Google but it really messes up with the keywords and don't give me the desired results. I have a file upload API and an interface that users interact ...
Diego Alves's user avatar
  • 2,697
0 votes
1 answer
283 views

I am trying to pass parameters to a server and extract the report in csv format. So the code i have has PUT/GET/POST in the order. I could get GET and POST work, but when i add PUT there is no error ...
Arun.K's user avatar
  • 103
0 votes
1 answer
181 views

In my factory return $resource('rest/records/:id', {}, { query: { method: 'GET', isArray: true, // RestSQL has an extra struct around the array ...
user avatar
1 vote
1 answer
115 views

If I have an observableArray and update one if the items using AJAX PUT (or PATCH) to a WebAPI method, should I either Just leave it at that assuming there are no errors. Send back the updated entity ...
PMC's user avatar
  • 4,756
0 votes
1 answer
74 views

I have a HTTP PUT/POST method to update a document in the database. However, in certain conditions (for example, the input transaction timestamp is less than the timestamp on the document), the PUT/...
Bhanu's user avatar
  • 419

15 30 50 per page