# -*- coding: utf-8 -*-
from urllib.parse import urlencode
import requests
from werkzeug.datastructures import MultiDict

from pyantidot.response import Response
from pyantidot.tools import Bunch


class Request(object):
    _web_service_name = NotImplemented
    _defaults = {}
    _protocol = 'https'
    _forced = {
        'output': 'json,3'
    }

    def __init__(self, url, service):
        self._api_address = '{0}://{1}'.format(self._protocol, url)
        self._service = service

    @property
    def service_address(self):
        return '{0}/{1}'.format(self._api_address, self._web_service_name)

    def get(self, parameters: MultiDict):
        parameters.update(self._defaults)
        parameters.update({
            'service': self._service
        })
        parameters.update(self._forced)
        parameters = [('afs:{0}'.format(key), value) for key, value in parameters.items(True)]

        url = '{0}?{1}'.format(self.service_address, urlencode(parameters))

        response = requests.get(url)
        return Response(Bunch(response.json()))


class SearchRequest(Request):
    _web_service_name = 'search'

@@ -276,32 +276,8 @@
  %7B%7D%0A
-    _protocol = 'https'%0A
     
@@ -288,16 +288,16 @@
 ced = %7B%0A
+
         
@@ -378,61 +378,17 @@
 lf._
-api_address = '%7B0%7D://%7B1%7D'.format(self._protocol,
+url =
  url
-)
 %0A   
@@ -504,19 +504,11 @@
 lf._
-api_address
+url
 , se

Remove Request._protocol attribute