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
1
vote
2 answers

What does the ? mean in "format(List"

I'm following the indications on this post to create a a parametrized URI for an Http GetMethod (http://some.domain/path?param1=value1¶m2=value2) and I ran into a new issue. I have this code: List params = new…
Carles Sala
  • 1,989
  • 1
  • 16
  • 34
1
vote
1 answer

HTTP response status for unknown (nonexistent) HTTP method

Let's say I've got route /posts. It only implements GET HTTP method. If someone tries to access it with different, existing method (POST, PUT, etc.) I return 405. What should I return in case someone tries using some unsupported, nonexistent method…
engray
  • 91
  • 1
  • 12
1
vote
0 answers

HTTP-Methods understanding: Why does the documentation use PUT instead of POST in this AWS API Gateway Integration?

In a project, we are using AWS Kinesis Firehose for Data Ingestion. To access it from the Browser and without Authentication I set up an AWS API Gateway to set up a public endpoint. To Ingest Data into Firehose you are supposed to use the PutRecords…
1
vote
2 answers

What HTTP method should I use for an endpoint that updates a status field of multiple entities

I like to use the correct HTTP methods when I'm creating an API. And usually it's very straightforward. POST for creating entities, PUT for updating them, GET for retrieving etc. But I have a use-case here where I will create an endpoint that…
Shawn-Ross
  • 137
  • 2
  • 12
1
vote
1 answer

Do a HTTP POST instead of a GET

The WebService I'm trying to use is SOAP and receives only the HTTP method POST on its requests, but for some reason, I'm not being able to make that happen and it's sending only GET. I've been loosely following this guide:…
1
vote
0 answers

Servlet forward() from POST to GET

I'm using a simple servlet that receives a POST request and forwards it to another servlet that expects a GET request. I'm aware as original HtppServletRequest is having POST as it's method, thus it's failing to forward. Also, the HtppServletRequest…
Prateek Pande
  • 495
  • 3
  • 12
1
vote
0 answers

Using HTTP GET Method with Two-factor Authentication

From a security standpoint, is it OK to pass a two-factor code via query strings on a GET request? Let’s say I have a protected resource that I want to fetch. The user is logged in and has 2FA enabled. Since I want to only fetch a resource I would…
1
vote
0 answers

Why "Unsubscribe" link from email uses GET method rather than POST, PUT, PATCH, or DELETE?

Just out of curiosity, I checked "Unsubscribe" links from commercial mails. I only checked 3 mails as a sample, but all of them were using GET method. It seems unintuitive to me since the function is not safe, so I thought either POST, PUT, PATCH,…
user2652379
  • 782
  • 3
  • 9
  • 27
1
vote
1 answer

What is the difference between Multipart and MIME content type?

I have been going through the entity content type in HTTP verbs but actually I can't understand the differences of both and how they were related. Can someone explain me how both works in a transfer.
Venkat
  • 139
  • 1
  • 8
1
vote
0 answers

DAViCal and nginx: problem with HTTP method REPORT

I found this problem trying to switch from lighttpd to nginx: my webserver hosts DAViCal for addresses and contacts, but in order to work it needs support for some uncommon HTTP methods on the web server. These are PROPFIND, OPTIONS, and…
eppesuig
  • 1,375
  • 2
  • 12
  • 28
1
vote
2 answers

Advice needed on some basic Java WebApplication/Servlet

I am learning how to build Java WebApplications with Servlets. So far, I set up a Maven project with a Tomcat server and made a basic application with some forms up and running. But I got some basic questions: What is the difference between the…
Rubie
  • 13
  • 2
1
vote
3 answers

Is there a more elegant/clean way to set HttpRequestMessage Headers using TryAddWithoutValidation method?

I'm using HttpRequestMessage from HttpClient in a couple of methods and currently, I'm repeating the following piece of code all over my code: This code was converted by https://curl.olsh.me/ so I'm not sure if best practices were used here. //…
basquiatraphaeu
  • 525
  • 7
  • 19
1
vote
1 answer

Flask-RESTful specify HTTP methods allowed for specific endpoints

Consider that I have two Resource classes: class UserView(Resource): def get(self, id): ... def post(self): ... def put(self, id): ... def delete(self, id): ... class AnotherUserView(Resource): …
Natarich J
  • 407
  • 2
  • 5
  • 17
1
vote
0 answers

When does the browser execute the CONNECT method?

In http we have a method called CONNECT. I am trying to understand when it is used by the browser. Is it used prior to every request or prior to every https request only? Further, as we know - the http protocol makes persistent connection with the…
variable
  • 8,262
  • 9
  • 95
  • 215
1
vote
3 answers

Different response for same API but different method (GET and POST)

I think this is a classic and typical question but I didn't find its answer. In my knowledge, the POST method is used to send data to the server with request parameter in message body to make it secure. And GET method is to retrieve data with…
Bashir
  • 2,057
  • 5
  • 19
  • 44