Beispiel #1
0
    def resource(self, url, **kwargs):
        response = self.request(url, **kwargs)
        schema = None

        schema_url = get_profile_from_header(response.headers)
        if schema_url is not None:
            schema = LazySchema(href=schema_url, session=self)

        return Resource.from_response(
            response=response, session=self, schema=schema)
Beispiel #2
0
    def resource(self, url, **kwargs):
        response = self.request(url, **kwargs)
        schema = None

        schema_url = get_profile_from_header(response.headers)
        if schema_url is not None:
            schema = LazySchema(href=schema_url, session=self)

        return Resource.from_response(response=response,
                                      session=self,
                                      schema=schema)
Beispiel #3
0
    def resource_from_response(self, response, schema):
        resource = Resource.from_response(
            response, session=self.session, schema=schema)

        return resource
Beispiel #4
0
    def resource_from_response(self, response, schema):
        resource = Resource.from_response(response,
                                          session=self.session,
                                          schema=schema)

        return resource