V vdudukov Member Licensed User Longtime User Jan 12, 2015 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Jan 12, 2015 #2 You should use HttpUtils2 to download the JSON string and then parse it. Upvote 0
DonManfred Expert Licensed User Longtime User Jan 12, 2015 #3 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
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
V vdudukov Member Licensed User Longtime User Jan 12, 2015 #4 DonManfred said: 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 Click to expand... Yes, it is basic authorization. Upvote 0
DonManfred said: 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 Click to expand... Yes, it is basic authorization.
DonManfred Expert Licensed User Longtime User Jan 12, 2015 #6 That´s no basic authentification... It is a login-form from this website Code: job1.Username = "user" job1.Password = "pass" will not work here You can see a website with basic authentification here Last edited: Jan 12, 2015 Upvote 0
That´s no basic authentification... It is a login-form from this website Code: job1.Username = "user" job1.Password = "pass" will not work here You can see a website with basic authentification here
V vdudukov Member Licensed User Longtime User Jan 12, 2015 #7 Well i dont know enough about websites, but man who develop this site said that is basic authentification. Well what can i do then ? Upvote 0
Well i dont know enough about websites, but man who develop this site said that is basic authentification. Well what can i do then ?
lemonisdead Well-Known Member Licensed User Longtime User Jan 12, 2015 #8 Huh... I wonder if you could not build the url including the two needed fields ??? https://fjaka.gastromaster.com.hr/Account/Logon?ReturnUrl=/&UserName=[SomeUserName]&Password=[SomePassword] Upvote 0
Huh... I wonder if you could not build the url including the two needed fields ??? https://fjaka.gastromaster.com.hr/Account/Logon?ReturnUrl=/&UserName=[SomeUserName]&Password=[SomePassword]
NJDude Expert Licensed User Longtime User Jan 12, 2015 #9 In order for this to work that site must have an API, otherwise you are wasting your time. Upvote 0
V vdudukov Member Licensed User Longtime User Jan 12, 2015 #10 Well he sent me only GET URL api/xxxx/warehouses and HTTP header params values AUTHORIZATION, BASIC AUTHORIZATION Upvote 0
Well he sent me only GET URL api/xxxx/warehouses and HTTP header params values AUTHORIZATION, BASIC AUTHORIZATION
NJDude Expert Licensed User Longtime User Jan 12, 2015 #11 Yes, but he needs to provide you more info, like how to login and the whole request to be sent to the API. Upvote 0
Yes, but he needs to provide you more info, like how to login and the whole request to be sent to the API.
DonManfred Expert Licensed User Longtime User Jan 12, 2015 #12 Does not look like any kind of api. Looks like a SIMPLE login-form for me. So i guess you need to manually logon in this site or get the API documentation (IF there is an API) from the publisher Upvote 0
Does not look like any kind of api. Looks like a SIMPLE login-form for me. So i guess you need to manually logon in this site or get the API documentation (IF there is an API) from the publisher
lemonisdead Well-Known Member Licensed User Longtime User Jan 12, 2015 #13 Or that's a form displayed because we made a POST and not a GET to the correct URL. @vdudukov : have you tried to use the GET method and the path https://fjaka.gastromaster.com.hr/api/xxxx/warehouses replacing xxxx with the login (or without but it could be strange to have put xxxx as a folder) Upvote 0
Or that's a form displayed because we made a POST and not a GET to the correct URL. @vdudukov : have you tried to use the GET method and the path https://fjaka.gastromaster.com.hr/api/xxxx/warehouses replacing xxxx with the login (or without but it could be strange to have put xxxx as a folder)
DonManfred Expert Licensed User Longtime User Jan 12, 2015 #14 lemonisdead said: Or that's a form displayed because we made a POST and not a GET to the correct URL. Click to expand... 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 said: Or that's a form displayed because we made a POST and not a GET to the correct URL. Click to expand... 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
lemonisdead Well-Known Member Licensed User Longtime User Jan 12, 2015 #15 DonManfred said: Mööööp... wrong. Click to expand... 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 You are probably right (trying to find some solutions) Upvote 0
DonManfred said: Mööööp... wrong. Click to expand... 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 You are probably right (trying to find some solutions)
lemonisdead Well-Known Member Licensed User Longtime User Jan 12, 2015 #16 And (I am crazy today to spend so much time on that interesting game) : Trying something like this : https://gastromaster.com.hr/api/fjaka/warehouses/?[some arguments to ask the api for] In the docs, nothing about the HTTP Header params ? Upvote 0
And (I am crazy today to spend so much time on that interesting game) : Trying something like this : https://gastromaster.com.hr/api/fjaka/warehouses/?[some arguments to ask the api for] In the docs, nothing about the HTTP Header params ?
DonManfred Expert Licensed User Longtime User Jan 12, 2015 #17 vdudukov said: and i get only site source Click to expand... that´s what httputils do... It get´s the "output" from the called url. Look in the Api documentation before you waste more of your (and ours) time. Upvote 0
vdudukov said: and i get only site source Click to expand... that´s what httputils do... It get´s the "output" from the called url. Look in the Api documentation before you waste more of your (and ours) time.
V vdudukov Member Licensed User Longtime User Jan 12, 2015 #18 DonManfred said: that´s what httputils do... It get´s the "output" from the called url. Look in the Api documentation before you waste more of your (and ours) time. Click to expand... Thank You everyone. Upvote 0
DonManfred said: that´s what httputils do... It get´s the "output" from the called url. Look in the Api documentation before you waste more of your (and ours) time. Click to expand... Thank You everyone.