Questions tagged [http-verbs]

HTTP Verbs represent the request methods that are recognized as part of the Hypertext Transfer Protocol. These include but are not limited to POST, GET , PUT and DELETE.

219 questions
1
vote
3 answers

Effective ViewBag using in MVC

I need to use same ViewBag objects for both HttpVerb these are HttpGet and HttpPost.Therefore I don't want to declare the ViewBags twice.I have created a parametric method and I am calling this method whenever I want to use it as followed sample.Is…
Goran Zooferic
  • 371
  • 8
  • 23
1
vote
1 answer

Meaning of idempotency in the context of HTTP PUT?

In this presentation on REST (timestamp 17:00-18:45), the speaker says that an HTTP PUT must include all the properties for a resource, and not be used for partial updates. This is required in HTTP because otherwise it is not idempotent. His…
user3364825
  • 1,541
  • 1
  • 15
  • 23
1
vote
2 answers

Assign a ressource should be what http verb in a REST API

I am doing attach and detach operations in my below controller like detaching the relationship from a OU to a ModuleDevice. What http verbs would those operations mean in a REST API? ModuleDevicesToOUController Api/ModuleDevicesToOU/1/OU/1 // Attach…
Elisabeth
  • 20,496
  • 52
  • 200
  • 321
1
vote
1 answer

ServiceStack hitting the wrong http verb

When trying to execute a POST request Delete(SourceInfo sourceInfo) is executed instead of Post(SourceInfo sourceInfo), if I remove Delete(SourceInfo sourceInfo) then Put(SourceInfo sourceInfo) is executed when executing a POST request. I'm pretty…
1
vote
1 answer

Should I use get, post, put - does it matter?

In my app I'm toggling whether a student belongs to a training time or not when clicking on a time link. # controller def time @student = Student.find(params[:student_id]) @time = TrainingTime.find(params[:training_time_id]) …
mind.blank
  • 4,820
  • 3
  • 22
  • 49
1
vote
1 answer

WSO2 API Manager authorisation based on HTTP verbs

I'm evaluating WSO2 API Manager to organize some corporate APIs. Is it possible to authorise users based on a combination of resources and HTTP verbs? To be clear, I need something like this: user1 with Access_Token_1, can POST, PUT and DELETE to…
user1959492
  • 63
  • 1
  • 4
1
vote
2 answers

Sharepoint - Multiple document upload - HTTP 'post' verb not allowed

When attempting to upload any number of documents, including very small files, seems to succeed- but subsequently redirects to an error page indicating the…
Chris Ballance
  • 33,810
  • 26
  • 104
  • 151
1
vote
1 answer

REST APIs, HTTP verbs and ACCESS LOGs

I've been trying to follow good RESTful APIs practices when designing them. One of them which happens to be very simple and common keeps getting hard to follow: Use GET http verb to retrieve resources Why? Consider you have a URI to get account…
Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
1
vote
4 answers

Do you check HttpVerbs in your unit tests?

While looking at the unit tests that come with the standard ASP.MVC Web Project template, I noticed that these do not test whether or not a proper HttpVerbs attribute is set on each action method. It's very easy to test this with reflection, but…
Adrian Grigore
  • 33,034
  • 36
  • 130
  • 210
0
votes
0 answers

Does JSON Patch Operation support creation of new key,an array, in a JSON Object?

I am trying to add new array key in JSON object but it is not adding a new element. Below this usedReference is not present in the JSON object. I want to create this array Element usedReference without updating the JSON object. { "op": "add", …
0
votes
0 answers

CONTRAST: Verb Tampering Weakness /WEB-INF/web.xml file

Getting Verb Tampering Weakness after scanning app with Contrast tool for in web.xml file. Code : Verb tampering Please suggest some solutions to avoid this vulnerability ? I tried couple of solutions like Replacing with . Removing but can't do…
0
votes
0 answers

HTTP Status Code 405 - Method not Allowed error on sending POST request from postman

I am trying to send a POST request to PROD server to fetch the response using the API I had created. It is working on my local and non-PROD environments. However, on sending request to PROD it is giving me 405 Error. Had put in the token required…
0
votes
2 answers

How to handle HTTP COPY/LINK Methods in NestJS Controller?

How is the elegant way to handle non standard HTTP methods like COPY, LINK, LOCK, UNLOCK in NestJs Controller? For standard HTTP Methods Request such GET, POST, PUT... We have a decorator like @Get, @Post, etc. But i want to handle some requests…
0
votes
2 answers

HTTP POST and PUT to create or update list of resources rather than single resource

Can I use POST or PUT rest endpoints to create or update list of items? or These should be always deal with single resource object? URL: POST/cars request body: { [ {id:car1}, {id:car2}, {id:car3} ] } If I pass list of resources to these…
0
votes
2 answers

PUT http verb for creating and updating a resource

Is it recommended practice to implement the below endpoint using 'PUT' verb to create & update a resource? PUT/jobs/{jobid} (or) POST/jobs - to create resource PUT/jobs/{jobid} - only to update the existing record Mixing up create & update logic…