{"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"intercept"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"request"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","text":"HTTPRequest"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"baseURL"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation3URLV","text":"URL"},{"kind":"text","text":", "},{"kind":"externalParam","text":"operationID"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":", "},{"kind":"externalParam","text":"next"},{"kind":"text","text":": "},{"kind":"attribute","text":"@Sendable"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","text":"HTTPRequest"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody"},{"kind":"text","text":"?, "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation3URLV","text":"URL"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"kind":"typeIdentifier","preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","text":"HTTPResponse"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody"},{"kind":"text","text":"?)) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"kind":"typeIdentifier","preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","text":"HTTPResponse"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody"},{"kind":"text","text":"?)"}]}]},{"kind":"parameters","parameters":[{"name":"request","content":[{"inlineContent":[{"text":"The outgoing HTTP request to modify.","type":"text"}],"type":"paragraph"}]},{"name":"body","content":[{"inlineContent":[{"type":"text","text":"The optional body of the HTTP request."}],"type":"paragraph"}]},{"name":"baseURL","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The base URL of the service."}]}]},{"name":"operationID","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The identifier of the API operation being called."}]}]},{"name":"next","content":[{"inlineContent":[{"type":"text","text":"The next middleware or transport to call in the chain."}],"type":"paragraph"}]}]},{"content":[{"anchor":"return-value","level":2,"text":"Return Value","type":"heading"},{"inlineContent":[{"text":"The HTTP response and optional response body from the service.","type":"text"}],"type":"paragraph"}],"kind":"content"}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware\/intercept(_:body:baseURL:operationID:next:)","interfaceLanguage":"swift"},"sections":[],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"Intercepts an outgoing HTTP request and attaches the "},{"type":"codeVoice","code":"User-Agent"},{"type":"text","text":" header."}],"variants":[{"paths":["\/documentation\/discogsservice\/useragentmiddleware\/intercept(_:body:baseurl:operationid:next:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"intercept(_:body:baseURL:operationID:next:)","symbolKind":"method","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"intercept"},{"kind":"text","text":"("},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","kind":"typeIdentifier","text":"HTTPRequest"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"baseURL"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier","text":"URL"},{"kind":"text","text":", "},{"kind":"externalParam","text":"operationID"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":", "},{"kind":"externalParam","text":"next"},{"kind":"text","text":": ("},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","kind":"typeIdentifier","text":"HTTPRequest"},{"kind":"text","text":", "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?, "},{"preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier","text":"URL"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"kind":"typeIdentifier","text":"HTTPResponse","preciseIdentifier":"s:9HTTPTypes12HTTPResponseV"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"HTTPBody","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC"},{"kind":"text","text":"?)) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"kind":"typeIdentifier","text":"HTTPResponse","preciseIdentifier":"s:9HTTPTypes12HTTPResponseV"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"HTTPBody","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC"},{"text":"?)","kind":"text"}],"modules":[{"name":"DiscogsService"}],"extendedModule":"DiscogsService","role":"symbol","externalID":"s:14DiscogsService19UserAgentMiddlewareV9intercept_4body7baseURL11operationID4next9HTTPTypes12HTTPResponseV_14OpenAPIRuntime8HTTPBodyCSgtAI11HTTPRequestV_AO10Foundation0I0VSSAK_AOtAQ_AoTtYaYbKXEtYaKF"},"references":{"doc://DiscogsService/documentation/DiscogsService/UserAgentMiddleware/intercept(_:body:baseURL:operationID:next:)":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware\/intercept(_:body:baseURL:operationID:next:)","kind":"symbol","role":"symbol","type":"topic","title":"intercept(_:body:baseURL:operationID:next:)","abstract":[{"type":"text","text":"Intercepts an outgoing HTTP request and attaches the "},{"code":"User-Agent","type":"codeVoice"},{"type":"text","text":" header."}],"url":"\/documentation\/discogsservice\/useragentmiddleware\/intercept(_:body:baseurl:operationid:next:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"intercept","kind":"identifier"},{"text":"(","kind":"text"},{"text":"HTTPRequest","preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"HTTPBody","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier"},{"text":"?, ","kind":"text"},{"text":"baseURL","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:10Foundation3URLV","text":"URL","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"operationID","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"next","kind":"externalParam"},{"text":": (","kind":"text"},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","text":"HTTPRequest","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody","kind":"typeIdentifier"},{"text":"?, ","kind":"text"},{"preciseIdentifier":"s:10Foundation3URLV","text":"URL","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> (","kind":"text"},{"preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","text":"HTTPResponse","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody","kind":"typeIdentifier"},{"text":"?)) ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> (","kind":"text"},{"preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","text":"HTTPResponse","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody","kind":"typeIdentifier"},{"text":"?)","kind":"text"}]},"doc://DiscogsService/documentation/DiscogsService":{"role":"collection","type":"topic","title":"DiscogsService","kind":"symbol","url":"\/documentation\/discogsservice","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","abstract":[{"type":"text","text":"A Swift client library for the Discogs API, built on top of Swift OpenAPI."}]},"doc://DiscogsService/documentation/DiscogsService/UserAgentMiddleware":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"UserAgentMiddleware"}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"UserAgentMiddleware"}],"abstract":[{"text":"A middleware that attaches the user agent header into the requests to the service.","type":"text"}],"title":"UserAgentMiddleware","url":"\/documentation\/discogsservice\/useragentmiddleware","type":"topic"}}}