How to send custom object in httpie request
I am making a project that uses httpie. I was able to send primitive fields and an array as a request parameter. For example, let's say I have a variable named "age" which is an integer type, I can send that variable as a Query parameter, Form parameter, or Path parameter. If I want to send age as a Query parameter, I would write the following:
http -v -f POST 'localhost:8080/api/v1/public/users?age=20'
The problem is when I want to send an object of a non-primitive class. For example, I have a class named Name, which is the following:
public class Name {
String first, middle, last;
}
Now for an object of this class, how can I send an object of class Name as a parameter in the httpie request. I tried a lot but didn't find a solution.
+3
source to share
No one has answered this question yet
Check out similar questions: