0

I used a xml parser many times but the only thing now is the server where the xml file is stored asks for a username and password (i have them) but how do i login with a httpGet or httpPost.

Thanks in advance.

(PS: The username and password are always the same)

2 Answers 2

1

I think you need to know how to do HTTP Authentication in android.

Read this question. There you will learn how to do HTTP authentication in android.

EDIT: Check here to see how to determine authetication type needed.

Sign up to request clarification or add additional context in comments.

1 Comment

Hello, thanks for your answer. But i tried it and it doesn't work. Maybe you can see what type of authencation is needed for this url: webservices.ns.nl/ns-api-avt?station=Utrecht
0

Using java.net.URLConnection is described very well in the following link by BalusC

Using java.net.URLConnection to fire and handle HTTP requests

Following that thread you can easily send httpGet or httpPost and login to server.

2 Comments

Maybe this sounds stupid but i can't find it on the given link :P
this thread is about working with httpGet or httpPost. not exactly fits with your requirement for authentication but helps you to know how to work with httpGet or httpPost.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.