Questions tagged [getmethod]

An HTTP protocol request method.

156 questions
33
votes
3 answers

How do I add query parameters to a GetMethod (using Java commons-httpclient)?

Using Apache's commons-httpclient for Java, what's the best way to add query parameters to a GetMethod instance? If I'm using PostMethod, it's very straightforward: PostMethod method = new PostMethod(); method.addParameter("key",…
Ross
  • 9,652
  • 8
  • 35
  • 35
18
votes
3 answers

Filtering out auto-generated methods (getter/setter/add/remove/.etc) returned by Type.GetMethods()

I use Type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic) to retrieve an array of methods for a given type. The problem is the returned MethodInfo could include methods that are generated by…
Dan7
  • 1,657
  • 1
  • 19
  • 31
14
votes
2 answers

C# GetMethod doesn't return a parent method

I have the following class tree: public class A { public static object GetMe(SomeOtherClass something) { return something.Foo(); } } public class B:A { public static new object GetMe(SomeOtherClass something) { …
Sebastián Vansteenkiste
  • 2,234
  • 1
  • 19
  • 29
9
votes
1 answer

Type.GetMethod alternative for TypeBuilder

I'm making a .NET-compliant compiler using Reflection.Emit. The problem is, that although TypeBuilder is derived from Type, it does not let me use all the handy methods that Type provides. The matters that really concern me are: Is there any way to…
Impworks
  • 2,647
  • 3
  • 25
  • 53
7
votes
1 answer

GetMethod when argument comes by reference

I'm creating an instance of an object using reflection and getting the methods within the class of the object, but then the problem comes when I have to use an array of type Type to avoid ambiguity problems, here is an example of the code that I'm…
Chema Sarmiento
  • 279
  • 2
  • 3
  • 11
5
votes
5 answers

Easy way to get all Enum values in c#

I've tried a little Program... I want to run a program and see all method names in c# class... Here is the code class Program { public int adf() { return 0; } static void Main(string[] args) { foreach (MethodInfo…
Chuck Norris
  • 15,207
  • 15
  • 92
  • 123
5
votes
3 answers

Django overriding detail view get method

This is my post detail view and it works perfectly. class PostDetailView(DetailView): model = Post context_object_name = 'post' template_name = 'posts/detail.html' def get_queryset(self, *args, **kwargs): request =…
asdfkjasdfjk
  • 3,784
  • 18
  • 64
  • 104
5
votes
4 answers

getDeclaredField(String) vs. getMethod(String) for private fields in a bean

I have a bean whose properties I want to access via reflection. I receive the property names in String form. The beans have getter methods for their private fields. I am currently getting the field using getDeclaredField(fieldName), making it…
Vivin Paliath
  • 94,126
  • 40
  • 223
  • 295
5
votes
4 answers

getClass().getMethod("name", unknown)

For a really abstract application I am creating, I need to call methods without knowing their parameter types and only knowing the parameters in a String shape. Let say I have the method; getNames(String like, int amount); and I have a array of…
Thizzer
  • 16,153
  • 28
  • 98
  • 139
4
votes
2 answers

How to query string to a web site using get method?

I want to send an information along with the url like a query string to the web site. This is exactly I call Process.Start("http://domain.com?value=anything"); but I don't want to open browser because don't want to interrupt the user who is using…
RaviKant Hudda
  • 1,042
  • 10
  • 25
3
votes
2 answers

esp32 connect(): socket error on fd 48, errno: 104, "Connection reset by peer"

I'm working on BasicHTTPClient for send the data from the esp32 cam board to webserver through GET method i have googled about this error can some explain me this error and tell me how to slove it thank you in advance!
Lokesh Jr
  • 33
  • 1
  • 5
3
votes
2 answers

How to send Body Data to GET Method Request android using volley?

I have an API which send me a JSON object when I send a token to the server , I use GET method and I have to send token in body, not headers, it works in postman correctly when I put token in body but I have volley server error in android studio and…
zahra7329
  • 53
  • 5
3
votes
1 answer

What is the overhead of reflection in GetMethods

I just refactored a common piece of code in several parsers I have written. The code is used to automatically discover method implementations and it comes in quite handy to extend the existing parsers or to use more DRY code (especially I am working…
Sebastian
  • 6,293
  • 6
  • 34
  • 47
3
votes
0 answers

Get Transfer-Encoding chunked in Response Header by HttpClient

I want to get the value of Location in Response Header by this code HttpGet getRequest = null; CloseableHttpResponse response = null; getRequest = new…
Leo Le
  • 815
  • 3
  • 13
  • 33
3
votes
2 answers

Is it not possible to send an array with GET method?

On the server side I have a method that accepts an array of integers and returns a Json object: public JsonResult GetCorrespondingOfficers(int[] categories){ //use `categories` return Json(model,JsonRequestBehavior.AllowGet); } And I have the…
Mikayil Abdullayev
  • 12,117
  • 26
  • 122
  • 206
1
2 3
10 11