GithubHelp home page GithubHelp logo

Comments (11)

JuTaK97 avatar JuTaK97 commented on June 6, 2024 1

405가 뜨는데 저기 @POST("api/v1/signup") 에 끝에 /로 닫아주세요. @POST("api/v1/signup/")

감사합니다 드디어 201이 떴네요ㅠㅠㅠ
정말감사합니다

from seminar-2021.

veldic avatar veldic commented on June 6, 2024

일단 5XX error 보다는 4XX error 쪽으로 접근하는게 좋습니다.
1번 방법이 제일 적절할 것 같은데...
RequestSignUp class 도 보여주시겠어요?

from seminar-2021.

JuTaK97 avatar JuTaK97 commented on June 6, 2024

일단 5XX error 보다는 4XX error 쪽으로 접근하는게 좋습니다. 1번 방법이 제일 적절할 것 같은데... RequestSignUp class 도 보여주시겠어요?

image

1번 방법의 requestsignup입니다.

from seminar-2021.

veldic avatar veldic commented on June 6, 2024

데이터 넣은것도 보여주시겠어요?

from seminar-2021.

JuTaK97 avatar JuTaK97 commented on June 6, 2024

image

이렇게 넣었습니다. (임시로 그냥 저기서 param 생성해서 넣었습니다)
loginService는
image

이렇게 했습니다.

from seminar-2021.

veldic avatar veldic commented on June 6, 2024

data class에 name이 아니라 username으로 넘겨주셔야 합니다!

from seminar-2021.

JuTaK97 avatar JuTaK97 commented on June 6, 2024

data class에 name이 아니라 username으로 넘겨주셔야 합니다!

아 제가 다시 1번 방법으로 되돌리다가 깜박했네요. 원래 username으로 했었습니다

from seminar-2021.

veldic avatar veldic commented on June 6, 2024

저렇게 보내서 log 보여주실 수 있나요?

from seminar-2021.

JuTaK97 avatar JuTaK97 commented on June 6, 2024
data class RequestSignup(

    val email: String,
    val username: String,
    val password:String,
    val role:String
)
interface LoginService {

    @POST("api/v1/signup")
    fun signup(@Body params: RequestSignup): Call<FetchSignup>
}
@Singleton
class LoginRepository @Inject constructor(private val loginService: LoginService){
    fun signup(): Call<FetchSignup> {

        val param = RequestSignup("[email protected]","aaa", "1234",
            "participant")
        return loginService.signup(param)
    }
}
data class FetchSignup (
    val name:String,
    val token:String
)

정리하면 이렇게 했습니다.

from seminar-2021.

JuTaK97 avatar JuTaK97 commented on June 6, 2024

log.txt

로그입니다.

from seminar-2021.

veldic avatar veldic commented on June 6, 2024

405가 뜨는데 저기 @POST("api/v1/signup") 에 끝에 /로 닫아주세요. @POST("api/v1/signup/")

from seminar-2021.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.