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
3 answers

Windows server how to send a HTTP delete method

I am working with Couchbase, and I want to delete a bucket. According to the official page I should do this: To delete buckets, use the DELETE /pools/default/buckets/[bucket-name] HTTP method and URI. I am working on Windows server 2012 and this…
Marco Dinatsoli
  • 10,322
  • 37
  • 139
  • 253
2
votes
0 answers

How to obtain FunctionImport HttpMethod in OData V3?

I have an OData V3 service where some of the FunctionImport elements have HTTP method set to POST, e.g.: This is a valid setting for OData V3 operations. But IEdmFunctionImport…
Vagif Abilov
  • 9,835
  • 8
  • 55
  • 100
2
votes
1 answer

How to create 2 actions with same path but different http methods Symfony2

I work with symfony routing annotation and I have already set the http_method_override to true I want to create two different actions but with a different behaviour according to the http method like this: /** * Event controller. * *…
Thomas Leduc
  • 1,092
  • 1
  • 20
  • 44
2
votes
0 answers

MongoDB Embedded Documents PATCH vs POST?

I would like to update an embedded document through an Api request and don't want to PUT the whole parent resource: Parent { _id: 123, ... events: [ ... ... ] } To update the embedded document, RFC 6902 A.16 suggests: PATCH…
dhudson
  • 571
  • 3
  • 9
2
votes
1 answer

how to get the server name from a http response

I want to know from which server a response comes. With a HttpMethod I'm readig the HttpStatus, the Method-Name and other stuff. But how do I get to know the Response-Server? Thanks for any help. Edit: boolean checkR(HttpMethod method){ if…
user1338413
  • 2,471
  • 8
  • 29
  • 36
2
votes
2 answers

GET and POST functions in PHP / CodeIgniter

I like MVC (a lot), and I am trying to teach myself a framework of MVC architecture in all the major web languages of today. I am currently on CodeIgniter and PHP. I searched online for a way to make the same function behave different for a POST and…
J86
  • 14,345
  • 47
  • 130
  • 228
2
votes
0 answers

Tomcat method restriction issue

I know this should be a simple one, but we can't get it to work. We are trying to restrict all Trace, Put and Delete methods to Tomcat so that we can clean up our vulnerabilty scans. We've tried adding the following in the /tomcat/conf/web.xml file…
SloDog
  • 21
  • 2
2
votes
2 answers

Correct return codes for REST stores

I am trying to figure out the right response for a REST store. I am well aware of the relevant RFC 2616; the relevant part is 9 Method Definitions Now... The short question: If I create a resource using POST or PUT, and do NOT want to return the…
Merc
  • 16,277
  • 18
  • 79
  • 122
1
vote
1 answer

gevent.WSGIServer request method mystery

I'm getting some really strange behaviour when running gevent's WSGIServer. It seems like every request that comes through is having its method interpreted incorrectly.. If I send the following…
Acorn
  • 49,061
  • 27
  • 133
  • 172
1
vote
1 answer

Delete action from timeline

Im using below php code to post an item to the timeline: $request_data=http_build_query( array( 'access_token'=>'xxx', 'item'=>'url' ) ); $c=curl_init('https://graph.facebook.com/me/zoo:action'); …
Znoopy
  • 25
  • 3
1
vote
1 answer

Send data with HTTP delete method

Is it possible to send data with the HTTP delete method because when I'm trying to send data with GWT request builder, on the server, it not finding the data!!
Noor
  • 19,638
  • 38
  • 136
  • 254
1
vote
0 answers

POST to server results in GET request

I'm trying to do a simple POST request to a server, with this code: NSString *post = [[NSString alloc] initWithFormat:@"email=%@&password=%@", self.email.text, ..]; // .. simplified keychainItem NSData *postEncoded = [post…
mmvie
  • 2,571
  • 7
  • 24
  • 39
1
vote
1 answer

What HTTP methods should be chosen in a REST API when no CRUD operations are going to be performed?

Lets consider a REST API for a backend application that does not have any DDBB dependencies or connections. For example, a python backend app which uses a machine learning model binary that takes a complex JSON and outputs a probability. I want to…
lazcuenqui
  • 25
  • 3
1
vote
1 answer

API is responding with status 200 when used with HEAD and OPTIONS method

I created an API with method GET using express which is working fine. following is the API app.get('/healthcheck', (_req, res) => { res.status(200).send({ state: 'Healthy', timestamp: new Date(), uptime: process.uptime() }); }); I…
Divya Singh
  • 147
  • 1
  • 13
1
vote
2 answers

HttpClient Get with file in body

I have to call an external API via a HttpGet that requires me to send a file in the body. I realize that this is a bad API design but since it's external, I have no influence over it and cannot change it. I let our internal users upload a csv file…
xeraphim
  • 4,375
  • 9
  • 54
  • 102