218 questions
0
votes
1
answer
79
views
How do I resolved Request filtering feature on IIS error
I hosted a .net8 core application on IIS server, I enabled and added http verbs using request filtering on IIS, it works for some days, but I don't know what changed.
when i click on Request filtering ...
0
votes
0
answers
2k
views
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 ...
0
votes
2
answers
828
views
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} ]
...
2
votes
1
answer
1k
views
How to Block Http Methods in ASP.NET
We have a requirement of disabling the HTTP methods besides POST, GET and Head in an ASPNET Core Web application due as a part of security fixes. How can we disable the HTTP OPTIONS method in ASP.Net ...
-1
votes
1
answer
895
views
Blazor Wasm - 405 HTTP verb used is not allowed
I uploaded a blazor webapp on a host and I get this error while trying to modify or delete a product:
405 - HTTP verb used to access this page is not allowed.
The page you are looking for cannot be ...
0
votes
0
answers
364
views
The most reliable way of specifying new REST routes for custom actions in yii\web\UrlManager configuration
I have created a standard yii\rest\ActiveController and added my custom action to it:
public function actionTest($id)
{
return ['test' => $id];
}
To make it work, I have added a new entry to ...
0
votes
1
answer
2k
views
How to display Body type in Swagger (OAS3) for GET requests?
So i'm working on some APIs (Spring Boot)where I have both input and output of type XML. For documenting, I'm using Swagger (OpenAPI 3). Here is the controller:
@RestController
@Validated
@...
0
votes
1
answer
50
views
How to determine http verb allowed on a .net function using ildasm
I have a .net DLL which has web api end points with http verb decoration. And I only have ildasm disassembler to view IL code. How can I check what http verb is allowed for an endpoint(a particular ...
1
vote
3
answers
9k
views
How do PUT, POST or PATCH request differ ultimately?
The data, being sent over a PUT/PATCH/POST request, ultimately ends up in the database.
Now whether we are inserting a new resource or updating or modifying an existing one - it all depends upon the ...
0
votes
1
answer
457
views
how to implement http patch logic
i am using java, spring mvc and mybatis.
for http patch, it is used to update partial resource, while put updates the entirely resource.
my code looks like
@RestController
@RequestMapping("/test&...
2
votes
2
answers
673
views
Which HTTP verb to use to get data based on complex input data
So if I would want to get say a User data, passing user id, I will use GET verb and pass user id in query string with route something like this
[HttpGet]
[Route("user/{userId}")]
But what ...
0
votes
2
answers
2k
views
Using GET verb to update in rest api?
I know the use of http verbs is based on standard specification. But my question if I use "GET" for update operations and write a code logic to update, does it create issues in any scenario? ...
9
votes
1
answer
2k
views
Why does Stripe use the Post method for updating resources
According to the RFC Put is used to update an existing resource.
But, the Stripe API uses Post to update objects. Why is this?
For example, in the Stripe Node Library
update: stripeMethod({
...
3
votes
1
answer
5k
views
Disable HTTP Options method in ASP.Net Core 3.1
We have a requirement of disabling the HTTP OPTIONS method in an ASPNET Core Web application due as a part of security fixes. How can we disable the HTTP OPTIONS method in ASP.Net core 3.1 API?
1
vote
1
answer
265
views
WEB API post from uri/ Query string in post
i have a model
public partial class TalentVendorShots
{
public int Id { get; set; }
public string Email { get; set; }
public string One { get; set; }
public ...
-1
votes
2
answers
200
views
HTTP REST: If a request is idempotent, but the resource is unchangeable once inserted, should PUT or POST be used?
Imagine an HTTP REST endpoint, where a resource is inserted, and that the resource is understood to be a "message". Each individual message is identified by a unique identifier, such as a GUID value ...
1
vote
3
answers
2k
views
Cannot call API DELETE in ASP.NET core when running my tests (405 Method Not Allowed) . BUT it works in swagger
Maybe there are some sort of permissions I need to set up in the test webhost ? The Get and Post for the tests work fine. But get a HTTP 405 error when it tries to call the DELETE method on the ...
0
votes
0
answers
25
views
ASP.NET & IIS 6.0 Verbs reset to default after upload
Every time I reload a project from the studio, I find that IIS overwrites the web config file. As a result, all settings are lost, including those allowed by verbs. You have to go to the Handler ...
2
votes
1
answer
509
views
HTTP verb GET or PATCH or POST or PUT when call increments views
I have an end point like this
/profiles/1
I want to get the profile whose id is 1 but at the same time increment the visited property by 1. The property comes as part of the object. Which HTTP verb I ...
1
vote
2
answers
2k
views
RESTful API design: list value options for query param
Let's say you are building an API returning a list of resources at
[GET] /resources
=>
[
{.. id: 1, foo: "A" ..}, {.. id: 2, foo: "B" ..}, {.. id: 3, foo: "A" ..}
]
...
0
votes
1
answer
304
views
403 forbidden on GET method while passing parameter integer value with delete keyword
Getting 403 Forbidden on GET method when Firewall is enable.
I have a requirement to search data on Web API, where I am passing input string as parameter in GET method. E.g. search "how are you" or "...
0
votes
2
answers
993
views
REST: How should a resource be “renewed”?
I am creating a RESTful API where “entries” can be added, modified, and deleted. Each entry is automatically assigned an expiration date when it’s created and is automatically deleted unless renewed ...
0
votes
2
answers
18k
views
IIS: How to disable HTTP method TRACE?
I followed this, which led to this to try to disable my website from accepting the TRACE method (verb). Basically I added the section below to <system.webServer> inside Web.config (Default Web ...
0
votes
1
answer
106
views
Use PUT or PATCH verb when request is updating and deleting: Real life design
I've been trying to get the HTTP verbs right lately, however I have a doubt regarding using PUT, PATCH or even POST for the following scenario.
The front end part is sending the following JSON data:
...
-1
votes
1
answer
64
views
What HTTP Verb Should I Use For Comparing Data
I have an endpoint that takes a list of email address (could be a very long list) and finds users with that email. What HTTP verb is best for this?
I am thinking GET as there is no backend mutation ...