M
M
Maxim2020-09-09 23:28:08
Java
Maxim, 2020-09-09 23:28:08

Not a valid Retrofit2 request: HTTP 404 Not found?

Good day.
The essence of the question is that there is a GET request. URL: https://api.privatbank.ua/p24api/infrastructure?js...
When executed, I constantly get HTTP 404 Not found.

How can I specify this part of "json&atm" in the retrofit request?

In the interface, I specified the request in this way:

@GET("infrastructure")
    Observable<List<AtmData>> getAtmDataByCity(
            @Query("json&atm&address") String address,
            @Query("city") String city
    );


as well as

@GET("infrastructure?json&atm")
    Observable<List<AtmData>> getAtmDataByCity(
            @Query("address") String address,
            @Query("city") String city


None of the methods work.
From this, the second question came up: how can I display the query string that I send in the logs?

Thanks in advance for your reply!

Link to the site: https://api.privatbank.ua/#p24/atm

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2020-09-10
@Qamrand

I found the solution here: https://stackoverflow.com/questions/46277907/retro...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question