WordsAPI

부분 유료
Verified
분류별 dpventures | 업데이트됨 15 days ago | Data
인기

9.9 / 10

지연 시간

190ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

retrofit return 404 code while postman get 200

Rapid account: Allhebra
Allhebra
4 years ago

I use this code:
@Headers(
"x-rapidapi-key:my-key; " +
"x-rapidapi-host:wordsapiv1.p.rapidapi.com; " +
“Content-Type:application/json”
)
@GET(“words/{target}”)
fun getWord(
@Path(“target”) target: String?
): Observable<Result<Any>?>

fun create(): WordsApiService {
val retrofit = Retrofit.Builder()
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.baseUrl(“https://rapidapi.p.rapidapi.com/”)
.build()
return retrofit.create(WordsApiService::class.java)
}

and get error: retrofit2.adapter.rxjava2.HttpException: HTTP 404 Not Found
but when I use postman I get response with 200 code.
Is there anybody who get success response with retrofit?

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입