I have two classes, the first one `WebsiteDescription` and the second one: `Course`.

Both have inheritance from `Decodable` and the first one is implementing the protocol `Encoder` without no definition.

But, my code has a problem:

> 
> Type 'WebsiteDescription' does not conform to protocol 'Encodable'
> 
> 
> 

This error appears in the line:

`self.requestdata(endpoint: jsonUrlString, type: WebsiteDescription.self) { result, error in
 }`

The complete code is:

```
import UIKit

public class WebsiteDescription:Decodable {
    init(){

    }
    let name: String?
    let description: String?
    //let courses: [Course]?

    func encode(to encoder: Encoder) throws {
        do {
        } catch {
            print(error)
        }
    }

}
class Course: Decodable {
    let id: Int?
    let name: String?
    let link: String?
    let imageUrl: String?
}

class RequestController : UIViewController{

    override func viewDidLoad() {
        super.viewDidLoad()
        let jsonUrlString = "http://api.letsbuildthatapp.com/jsondecodable/website_description"

        self.requestdata(endpoint: jsonUrlString, type: WebsiteDescription.self) { result, error in

        }
    }

    func requestdata<T:Codable>(endpoint :String, type: T.Type, completionHandler: @escaping (T?, Error?) -> ()) {

        let jsonUrlString = "http://api.letsbuildthatapp.com/jsondecodable/website_description"
        guard let url = URL(string: jsonUrlString) else {return }
        URLSession.shared.dataTask(with: url){ (data, response, err) in
            guard let data = data else{ completionHandler(nil, nil) }
            do {
                let result = self.parse(data: data, type: type)
                completionHandler(result, nil)
            } catch let jsonErr{
                completionHandler(nil, jsonErr)
            }
        }.resume()
    }

    private func parse<T:Codable>(data: Data,  type: T.Type) -> T? {

        do{
            let json = try JSONDecoder().decode(type, from: data)
            print(json)
            return json
        }catch {
            return nil
        }
        return nil
    }
}

```

Well, I'm trying to use `URLSession` in my method to cast all my request in a single middleware.

How I can resolve the `Encodable` issue?