@@ -54,7 +54,7 @@ pub async fn request_handler<I>(
5454 typed_header : TypedHeader < TapReceipt > ,
5555 state : State < Arc < IndexerServiceState < I > > > ,
5656 headers : HeaderMap ,
57- body : Bytes ,
57+ body : String ,
5858) -> Result < impl IntoResponse , IndexerServiceError < I :: Error > >
5959where
6060 I : IndexerServiceImpl + Sync + Send + ' static ,
@@ -73,15 +73,15 @@ async fn _request_handler<I>(
7373 TypedHeader ( receipt) : TypedHeader < TapReceipt > ,
7474 State ( state) : State < Arc < IndexerServiceState < I > > > ,
7575 headers : HeaderMap ,
76- body : Bytes ,
76+ req : String ,
7777) -> Result < impl IntoResponse , IndexerServiceError < I :: Error > >
7878where
7979 I : IndexerServiceImpl + Sync + Send + ' static ,
8080{
8181 trace ! ( "Handling request for deployment `{manifest_id}`" ) ;
8282
8383 let request: QueryBody =
84- serde_json:: from_slice ( & body ) . map_err ( |e| IndexerServiceError :: InvalidRequest ( e. into ( ) ) ) ?;
84+ serde_json:: from_str ( & req ) . map_err ( |e| IndexerServiceError :: InvalidRequest ( e. into ( ) ) ) ?;
8585
8686 let Some ( receipt) = receipt. into_signed_receipt ( ) else {
8787 // Serve free query, NO METRICS
@@ -178,17 +178,14 @@ where
178178 . await
179179 . map_err ( IndexerServiceError :: ProcessingError ) ?;
180180
181- let req =
182- std:: str:: from_utf8 ( & body) . map_err ( |_| IndexerServiceError :: FailedToSignAttestation ) ?;
183-
184181 let res = response
185182 . as_str ( )
186183 . map_err ( |_| IndexerServiceError :: FailedToSignAttestation ) ?;
187184
188185 let attestation = AttestationOutput :: Attestation (
189186 response
190187 . is_attestable ( )
191- . then ( || signer. create_attestation ( req, res) ) ,
188+ . then ( || signer. create_attestation ( & req, res) ) ,
192189 ) ;
193190
194191 let response = response. finalize ( attestation) ;
0 commit comments