Giter Club home page Giter Club logo

sopt26thirdseminar's Introduction

SOPT third project

***1. Postman을 이용한 로그인, 회원가입 구현 ***2. Request / Response 객체 ***3. Retrofit Interface 구현체 생성 ***4. Callback 등록과 통신 요청


MEMO

  1. JSON data 사용시, 서버에서 정한 변수가 아닌 내가 이름을 지어주고 싶을 때

     data class ResponseLogin(  
        val status : Int,  
        val success : Boolean,  
      **@SerializedName("data")**  
        val data: SomeData?  
    )
    
  2. requestLogin/Register에서 로그인 정보 전달 후 Callback 등록해주고 Retrofit의 Callback import 해주기

  3. Retrofit Interface 설계

     interface RequestInterface{  
     @POST("user/signin/")  
     fun requestLogin(@Body body : RequestLogin) : Call<ResponseLogin>  
     @POST("user/signup/")  
     fun requestRegister(@Body body: RequestRegister) : Call<ResponseRegister>  
    

    }


Screenshot

xxx

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.