I need to change the content type to "application/json", and I've found a couple of discussions in the forums, but none of them seem to explain how to do it.
One poster says that "I have modified the HttpJob module with: req.SetContentType ( "application/json")". Where is this HttpJob module, and how do I modify it?
In another post, Erel says:
You can modify this sub:
Public Sub GetRequest As HttpRequest
Return req
End Sub
And add:
req.SetContentType(...)
But where is this GetRequest sub located? And, again, how do I modify it?
In that same thread, another poster says that he has this in his code:
job2.PutString("http://10.0.1.54:8080/security/register", objJSon.ToPrettyString(2))
job2.GetRequest.SetContentType("application/json")
However, when I try this, the compiler says:
Error description: Unknown type: anywheresoftware.b4a.http.HttpClientWrapper.HttpUriRequestWrapper
Are you missing a library reference?
Occurred on line: 211
job2.GetRequest.SetContentType("application/json")
Word: setcontenttype
Help!
Can someone please explain exactly what I need to do, and where and how to do it?
Thanks, Peter
One poster says that "I have modified the HttpJob module with: req.SetContentType ( "application/json")". Where is this HttpJob module, and how do I modify it?
In another post, Erel says:
You can modify this sub:
Public Sub GetRequest As HttpRequest
Return req
End Sub
And add:
req.SetContentType(...)
But where is this GetRequest sub located? And, again, how do I modify it?
In that same thread, another poster says that he has this in his code:
job2.PutString("http://10.0.1.54:8080/security/register", objJSon.ToPrettyString(2))
job2.GetRequest.SetContentType("application/json")
However, when I try this, the compiler says:
Error description: Unknown type: anywheresoftware.b4a.http.HttpClientWrapper.HttpUriRequestWrapper
Are you missing a library reference?
Occurred on line: 211
job2.GetRequest.SetContentType("application/json")
Word: setcontenttype
Help!
Can someone please explain exactly what I need to do, and where and how to do it?
Thanks, Peter