Questions tagged [http-method]

HTTP methods used to designate the appropriate action to direct a server towards a resource. GET and POST are the most widely known; PATCH and DELETE also fit in that category, among others.

355 questions
2
votes
1 answer

NGINX: how to process requests with different http methods to one location differently

(The situation that caused the question is pretty defined and not abstract. But I know applicable to it workarounds thus I dropped details in order to get general pipeline that answers to this question.) Problem description: Imagine that you have…
Nick Vee
  • 621
  • 2
  • 7
  • 17
2
votes
0 answers

Do HTTP responses have HTTP methods?

I am learning HTTP and I have a basic question: Do HTTP responses have HTTP methods like in the HTTP requests (GET, POST, PUT, DELETE, etc.)? If so, I have another question: Does the HTTP method of an HTTP response always is POST to allow having…
Aliuk
  • 1,249
  • 2
  • 17
  • 32
2
votes
1 answer

Endpoint naming convention for assigning/unassigning data

Imagine e.g. binding table user_tasks(user_id, task_id) with m:n relationship. I want to insert new record. The endpoint should return 204 Status No Content if the record was inserted or if such record already existed. How would you compose such…
shebik
  • 653
  • 9
  • 10
2
votes
1 answer

disable http method in express js

im doing nessus testing on my express app and here what i get Based on tests of each method : HTTP methods ACL CHECKOUT COPY DELETE GET HEAD LOCK MERGE MKACTIVITY MKCOL MOVE NOTIFY OPTIONS PATCH POST PROPFIND PROPPATCH PUT REPORT SEARCH…
zhang yu
  • 45
  • 1
  • 4
2
votes
1 answer

Django REST: OPTIONS request is registered as PUT

Whenever the browser sends an OPTIONS request, Django REST registers that as a PUT request. I was writing my permission code when I noticed it. I use the default request parameter that is passed into the def has_object_permission( self, request,…
2
votes
1 answer

Browser still send HTTP POST request after preflight request does not allow POST method

I'm confused about that my API server (NodeJS Express) only allow GET method res.setHeader('Access-Control-Allow-Methods', 'GET'); then I make a CORS POST request with header headers: { 'Content-Type': 'application/json', 'X-Test-Header':…
Quoc Van Tang
  • 1,075
  • 4
  • 15
  • 33
2
votes
1 answer

Angular Http PUT not sending request to Web-API

I have a c# WEB API using Entity Framework - I am trying to make a put request through my angular front end to simulate a 'checkin' function but the request isn't going through. Here is my Web api method [HttpPut("checkin/{id}")] …
rahulchawla
  • 101
  • 2
  • 9
2
votes
2 answers

Login - Filling form and submitting

I an new to java and I need help. I am trying to login to a website using java, and everything seems to be fine until now. I get the response back and everything, but It doesn't attempt to log in, which is kind of weird.. The response I get when I…
nano mano
  • 43
  • 5
2
votes
3 answers

HTTP 405 Errors after Publishing Web API 2 Applications

I have a Web Api Controller and i have tested all actions on localhost and it works well.But when i Published it on Web Server,Just Actions with [HttpGet] works and [HttpPost] Actions return Http 405 error public class ContentController :…
mohsen
  • 1,763
  • 3
  • 17
  • 55
2
votes
1 answer

How do I use my own method with an HttpURLConnection object on Android?

According to the void setRequestMethod (String method) documentation here: https://developer.android.com/reference/java/net/HttpURLConnection.html#setRequestMethod%28java.lang.String%29 The allowed methods are limited…
Alexis Wilke
  • 19,179
  • 10
  • 84
  • 156
2
votes
1 answer

Status code when using PUT endpoint to create resource in REST api

When you use PUT endpoint to create resource in REST api, what should the endpoint return for subsequent calls after returning 201(created) for the first call? 403(cannot create since the resource already exist)? 200(updated to the same exact…
Clojurevangelist
  • 564
  • 1
  • 8
  • 13
2
votes
1 answer

HTTP Method - POST vs. PATCH or PUT - When User Is Not Going to Update Anything Actually

Sometimes user is not going to send data to the server to update a resource but the resource would be updated by the server automatically. I think the best example is deactivating a profile. I describe the example below. Example: User is trying to…
Alex
  • 1,623
  • 1
  • 24
  • 48
2
votes
0 answers

I'm trying to send a POST request with Alamofire 4.0 & Swift 3, but the server receive GET parameters

I'm trying to make a request sending parameters by POST, Alamofire request says that its POST, but my server get the parameters by GET. let formParams:[String : String] = ["facebook_id": COUtils.userProfile["id"]!, "full_name": name, "email":…
Patricio Bravo
  • 406
  • 6
  • 8
2
votes
0 answers

Camel Swagger Multiple post method throwing error

I am trying out a sample using swagger component of camel. Below is my camel-context.xml
Roy
  • 1,231
  • 1
  • 24
  • 61
2
votes
2 answers

Is the HTTP method PURGE idempotent in Varnish?

Is the HTTP verb PURGE idempotent? If I send the same PURGE request twice will I receive 200 the second time? I have a microservice that invalidates a Varnish cache before publishing a message into a rabbit queue. In case of purge failure our need…
Gabe
  • 5,997
  • 5
  • 46
  • 92