Android Question GetResponse(JSON)

vdudukov

Member
Licensed User
Longtime User
Hello everyone.

I need a little help with httputils2.


I have username and password, and i must get response from server.
I am trying to understand all of this, but i need little help.

So somebody can help, I would appreciate it.

Thanks.


Request

Method

URL

GET

api/xxx/warehouses

HTTP Header params

Values


Basic Authorization


Response


[

{

"id": 6,

"name": "name",

"organizationName": "orgName",

"locationName": "locName",

"address": "A",

"city": "B"




Site url = https://sitexxxx.com/api/xxx
 

DonManfred

Expert
Licensed User
Longtime User
job1.Username = "user"
job1.Password = "pass"

is used to set username and password for an area which is using basic-authentification (.htaccess and .htpasswd)

If the site has an API then you need to look into the API-Documentation what you need to do
 
Upvote 0

vdudukov

Member
Licensed User
Longtime User
job1.Username = "user"
job1.Password = "pass"

is used to set username and password for an area which is using basic-authentification (.htaccess and .htpasswd)

If the site has an API then you need to look into the API-Documentation what you need to do

Yes, it is basic authorization.
 
Upvote 0

vdudukov

Member
Licensed User
Longtime User
Well i dont know enough about websites, but man who develop this site said that is basic authentification.o_O

Well what can i do then ?
 
Upvote 0

vdudukov

Member
Licensed User
Longtime User
Well he sent me only GET URL api/xxxx/warehouses
and HTTP header params values AUTHORIZATION, BASIC AUTHORIZATION
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Or that's a form displayed because we made a POST and not a GET to the correct URL.
Mööööp... wrong... calling url?username=xxx&password=bla is a GET-Request not a POST request!

But you may right that this is probably the behaviour of this site
 
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
Mööööp... wrong.
Unsure but right : admit the server asking for the full URL or replying with a page letting you understand you've made a POST. Ah ah :p
You are probably right (trying to find some solutions)
 
Upvote 0
Top